0
A
回答
0
我会建议,如果你想使用无头与phantomjs使用phantomjs而不是司机的HtmlUnit无头的自动化现在
。为你的headleass工作下载phantomjs的稳定版本。从下面的链接下载: -
http://phantomjs.org/download.html
现在添加System.setPropertybefore
驱动程序实例
DesiredCapabilities caps = new DesiredCapabilities();
caps.setJavascriptEnabled(true); // not really needed: JS enabled by default
caps.setCapability(PhantomJSDriverService.PHANTOMJS_EXECUTABLE_PATH_PROPERTY, "C:/phantomjs.exe");
WebDriver driver = new PhantomJSDriver(caps);
参考下面的详细信息的链接: -
http://seleniumworks.blogspot.in/2013/03/headless-browser-testing-using.html
相关问题
- 1. 用硒驱动程序运行node-red
- 2. 尝试启动与硒webdriver Linux上的铬驱动程序
- 3. 无法使用硒的webdriver
- 4. 无法使用硒的webdriver
- 5. 无法使用webdriver的的HtmlUnit在Python
- 6. Selenium远程驱动程序与HtmlUnit驱动程序问题
- 7. Java Selenium Htmlunit驱动程序Javascript错误
- 8. 与JAVA的硒webdriver
- 9. 如何运行以静音模式使用IE驱动程序以java编写的硒webdriver脚本
- 10. 无法运行硒WebDriver JavaScript绑定
- 11. 无法使用硒webdriver启动网站
- 12. HtmlUnit驱动程序无法选择正确的URL
- 13. 无头浏览器自动化 - 使用Selenium和htmlunit驱动程序
- 14. 如何使用safari驱动程序运行硒脚本?
- 15. 同时通过硒webdriver进行数据驱动程序测试
- 16. 无法使用硒的webdriver 3.0.1使用写在Eclipse的Java
- 17. 无法点击使用硒网络驱动程序
- 18. 无法使用硒网络驱动程序
- 19. 歌剧驱动程序与硒的工作 - Java的
- 20. Htmlunit驱动程序有Javascript的问题
- 21. 如何使用Python绑定在Selenium webdriver中加载HtmlUnit驱动程序?
- 22. 硒webdriver的错误,壁虎驱动程序下载
- 23. 无法点击使用硒的webdriver
- 24. 无法使用硒的webdriver在codeception
- 25. 无法找到使用硒的webdriver
- 26. 无法使用硒的webdriver 3.0.0-β3
- 27. 使用硒web驱动程序的jar文件导入的java应用程序
- 28. 硒的webdriver运行问题
- 29. 使用Java驱动程序运行准备好的MongoDB查询
- 30. 使用Java驱动程序运行聚合 - MongoDB的
你的错误是在其中行../ –
请不要将文字发布为图片。还提供完整的[mcve]。 – SiKing