参考:https://github.com/SeleniumHQ/selenium/wiki/InternetExplorerDriver
1.需要在selenium下载专门针对ID的驱动:
2.需要在实例化之前加入:
System.setProperty("webdriver.ie.driver", "D:\\SETUPS\\IEDriverServer_x64_2.53.1\\IEDriverServer.exe"); // 必须加入
WebDriver driver = new InternetExplorerDriver();
3.需要调整IE浏览器的安全选项,所有区域每一个复选框打上勾;
4.其他问题,请参考:
http://toolsqa.com/selenium-webdriver/challenges-to-run-selenium-scripts-with-ie-browser/