selenium在使用sendkeys()时出现的问题
2014-11-17 00:00
204 查看
代码: driver.findElement(By.id("kw")).sendKeys("123");
出现的这个问题:
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
The method sendKeys(CharSequence[]) in the type WebElement is not applicable for the arguments (String)
at selenium22.T1.main(T1.java:24)
解决方法
出现的这个问题:
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
The method sendKeys(CharSequence[]) in the type WebElement is not applicable for the arguments (String)
at selenium22.T1.main(T1.java:24)
解决方法
searchField.sendKeys(new String[] { "sample" }); 将sendKeys中的内容换成上面的内容。
相关文章推荐
- 使用selenium的时候firefox容易出现的问题
- 安装selenium使用webdriver出现的问题
- 使用selenium的时候firefox容易出现的问题
- 在使用sendkeys()时出现的问题
- 使用Selenium + Chromedriver出现的问题
- 使用enterprise library部属中出现的问题
- 使用Nunit对使用NHibernate的类进行测试出现的问题解决
- 关于使用VS.Net2003调试器出现的问题及相关解决方法
- 关于使用VS.Net2003调试器出现的问题及相关解决方法 (转)
- 使用copy出现的问题
- 如何解决ADO.NET访问Access数据库出现"操作必须使用一个可更新的查询"的问题
- VC6.0使用Greta的工程在VS2005中编译出现的问题:C2079,LNK1123,CVT1100等等
- 初步使用ASP.net出现的怪问题
- 关于httpcontext实际使用时出现的一个问题
- 使用phpedit/cakephp中出现的乱码问题及解决
- 使用.NET部署程序出现的奇怪问题
- 关于使用 session_start 出现的 Warning: session_start(): Cannot send sessioncache limiter - 问题的解决
- 关于在VB中使用Access数据库出现的问题
- 蛙蛙推荐:使用FreeTextBox出现脚本错误的问题解决
- 如何解决ADO.NET访问Access数据库出现"操作必须使用一个可更新的查询"的问题(非原创,摘自书中)