在eclipse上使用selenium 写脚本的时候,碰到sendkeys("selenium");报错
eclipse
解决方法ide
searchField.sendKeys(new String[] { "sample" });
将sendKeys中的内容换成上面的内容spa
这样就能够正常运行了ip
若是这样还报错selenium
缘由是旧版本的Java不理解非随机变量参数it
解决方法io
在工程上点击右键选择Properties -> Java Compiler,选择1.7版本class