码迷,mamicode.com
首页 > 其他好文 > 详细

org.openqa.selenium.remote.SessionNotFoundException: Unexpected error launch IE

时间:2015-11-08 14:55:33      阅读:376      评论:0      收藏:0      [点我收藏+]

标签:

1.在启动ie浏览器前先加入属性设置一项:

DesiredCapabilities ie = DesiredCapabilities.internetExplorer();
ie.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS, true);
		
System.setProperty("webdriver.ie.driver", "e:/IEDriverServer.exe");
driver = new InternetExplorerDriver(ie);

  

2.如果加入属性项返回“This is the initial start page for the WebDriver server.” 则说明你浏览器进行了缩放,具体如报错:

Exception in thread "main" org.openqa.selenium.remote.SessionNotFoundException: Unexpected error launching Internet Explorer. Browser zoom level was set to 125%. It should be set to 100% (WARNING: The server did not provide any stacktrace information)
解决方案:将IE浏览器缩放比例设置成100%  页面→缩放,选择100%,再次运行即可。

org.openqa.selenium.remote.SessionNotFoundException: Unexpected error launch IE

标签:

原文地址:http://www.cnblogs.com/dtest/p/4946949.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!