解决selenium报错:The path to the driver executable must be set by the webdriver.ie.driver system prop...

参考:https://github.com/SeleniumHQ/selenium/wiki/InternetExplorerDriver

1.需要在selenium下载专门针对ID的驱动:

image.png

2.需要在实例化之前加入:

System.setProperty("webdriver.ie.driver", "D:\\SETUPS\\IEDriverServer_x64_2.53.1\\IEDriverServer.exe"); // 必须加入
WebDriver driver = new InternetExplorerDriver();

3.需要调整IE浏览器的安全选项,所有区域每一个复选框打上勾;

image.png

4.其他问题,请参考:

http://toolsqa.com/selenium-webdriver/challenges-to-run-selenium-scripts-with-ie-browser/

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容