使用IEDriverServer_x64_2.25.2版本驱动IE运行Selenium脚本出错

原创
2014/11/19 15:59
阅读数 234
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.23 seconds Build info: version: '2.42.2', revision: '6a6995d', time: '2014-06-03 17:42:30' System info: host: 'Robin-20131022', ip: '172.20.59.208', os.name: 'Windows 8', os.arch: 'amd64', os.version: '6.2', java.version: '1.7.0_21' Driver info: org.openqa.selenium.ie.InternetExplorerDriver

org.openqa.selenium.remote.SessionNotFoundException: 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.23 seconds
Build info: version: '2.42.2', revision: '6a6995d', time: '2014-06-03 17:42:30'
System info: host: 'Robin-20131022', ip: '172.20.59.208', os.name: 'Windows 8', os.arch: 'amd64', os.version: '6.2', java.version: '1.7.0_21'
Driver info: org.openqa.selenium.ie.InternetExplorerDriver
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:204)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:162)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:599)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:240)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:225)
at org.openqa.selenium.ie.InternetExplorerDriver.run(InternetExplorerDriver.java:182)
at org.openqa.selenium.ie.InternetExplorerDriver.<init>(InternetExplorerDriver.java:174)
at org.openqa.selenium.ie.InternetExplorerDriver.<init>(InternetExplorerDriver.java:146)
at tongxunlu.Sousuo.setUp(Sousuo.java:39)
N/A

java.lang.NullPointerException
at tongxunlu.Sousuo.tearDown(Sousuo.java:111)

以上错误,源自IE的缺省保护级别设置为勾选(True),修改 Internet选项->安全->启用保护模式,去掉勾选后重启IE,重新运行脚本,成功!

展开阅读全文
打赏
0
0 收藏
分享
加载中
更多评论
打赏
0 评论
0 收藏
0
分享
返回顶部
顶部