Re: [webdriver] How do I clear a textbox before writing to it? Using Webdirver C# and there is no way to use Keys.Chord
press, so if you do (uncompiled/untested code):
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).
'';", element);
- show quoted text -
https://groups.google.com/forum/?fromgroups=#!topic/webdriver/UeAp--Gxjfw
本文介绍了在使用WebDriver C#时,如何通过JavaScript执行清空文本框的操作,并直接输入所需内容,绕过键盘快捷键可能带来的问题。
5万+

被折叠的 条评论
为什么被折叠?



