failed: java.lang.RuntimeException: org.openqa.selenium.WebDriverException: Unexpected error launching Internet Explorer. Protected Mode settings are not the same for all zones. Enable Protected Mode must be set to the same value (enabled or disabled) for all zones. (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 1.06 seconds
Build info: version: '2.37.0', revision: 'a7c61cb', time: '2013-10-18 17:14:00'
System info: host: 'Test3-PC', ip: '172.16.8.184', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.7.0_45'
Driver info: org.openqa.selenium.ie.InternetExplorerDriver
Command duration or timeout: 1.86 seconds
Build info: version: '2.35.0', revision: '8df0c6bedf70ff9f22c647788f9fe9c8d22210e2', time: '2013-08-17 12:46:41'
System info: os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.7.0_15'
Driver info: org.openqa.selenium.remote.RemoteWebDriver)
连接局域网中的另一台电脑,做selenium webdriver 远程测试,之前一直是好的,后来过几天再运行发现报以上错误,网上搜了下,问题解决,原理暂时没时间研究.
原来代码为: WebDriver webDriver; webDriver = new RemoteWebDriver(new URL("http://192.168.0.30:4444/wd/hub"), DesiredCapabilities.internetExplorer()); 改为: WebDriver webDriver; DesiredCapabilities ieCapabilities = DesiredCapabilities.internetExplorer(); ieCapabilities.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS, true); webDriver = new RemoteWebDriver(new URL("http://192.168.0.30:4444/wd/hub"), ieCapabilities);