sendkeys在Selenium Webdriver中不起作用 [英] sendkeys are not working in Selenium Webdriver
本文介绍了sendkeys在Selenium Webdriver中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我无法使用Web驱动程序在应用程序中添加任何价值. 我的应用程序正在使用框架.
I am not able to put any value in my application using web driver. My application is using frames.
我可以使用driver.findElement(By.name("name")).clear();
清除文本框的值,但无法使用driver.findElement(By.name("name")).sendKeys("manish");
放置任何值. click
命令适用于同一页面上的另一个按钮.
I am able to clear the value of my textbox with driver.findElement(By.name("name")).clear();
, but I'm unable to put any value using driver.findElement(By.name("name")).sendKeys("manish");
. The click
command works for another button on the same page.
推荐答案
我以前也遇到过这个问题.但是后来我要做的就是
I also had that problem as well before. But then what I did to make it work is
myInputElm.click();
myInputElm.clear();
myInputElm.sendKeys('myString');
这篇关于sendkeys在Selenium Webdriver中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文