mateenhussain
15 years agoOccasional Contributor
Clear text before doing Send Keys
Hi
I am trying to edit a textbox. At first I used testObj.wText property to set text on the textbox. But I had to move to testObj.SendKeys() method as wText didnt work on all platforms, due to user privilege.
The problem I am facing with SendKeys is, it doesn't clear any existing text before sending text to the textbox. It always starts typing from position 0 (i.e beginning).
1) Is the above behaviour expected?
2) How can I clear existing text of the textbox, before sending in keystrokes? I tried testObj.Keys("[Clear]"); method, but it didn't help me much.
Thanks,
Mateen