使用IEDriverServer_x64_2.25.2版本驱动IE运行Selenium脚本出错
使用IEDriverServer_x64_2.25.2版本驱动IE运行Selenium脚本出错
三平行者 发表于3年前
使用IEDriverServer_x64_2.25.2版本驱动IE运行Selenium脚本出错
  • 发表于 3年前
  • 阅读 83
  • 收藏 0
  • 点赞 0
  • 评论 0

腾讯云 学生专属云服务套餐 10元起购>>>   

摘要: 使用IEDriverServer 2.25版本驱动IE运行Selenium脚本,报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. 错误,原因是IE的保护级别设置较高,调整后重新运行成功。
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,重新运行脚本,成功!

共有 人打赏支持
粉丝 4
博文 31
码字总数 14634
×
三平行者
如果觉得我的文章对您有用,请随意打赏。您的支持将鼓励我继续创作!
* 金额(元)
¥1 ¥5 ¥10 ¥20 其他金额
打赏人
留言
* 支付类型
微信扫码支付
打赏金额:
已支付成功
打赏金额: