Also you have to clear() the text field first if you don't want it to
append.
-Luke
> --
> You received this message because you are subscribed to the Google
> Groups "webdriver" group.
> To post to this group, send email to webd...@googlegroups.com.
> To unsubscribe from this group, send email to webdriver+...@googlegroups.com
> .
> For more options, visit this group at http://groups.google.com/group/webdriver?hl=en
> .
>
If Webdriver's goal is to strictly emulate user actions, shouldn't there
be the equivalent of pasting text? I don't see it in WebElement or
RenderedWebElement.
Bill
element.SendKeys(Keys.Control + "v");
it will paste the contents of your clipboard, if you:
element.SendKeys(Keys.Control + "a");
it will select all.
Also, if you want to manually set the contents of the text field by
javascript (ignoring events), you can:
((IJavascriptExecutor)driver).ExecuteScript("arguments[0].value =
'';", element);