[英]org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session error with Selenium and IE11 using Java
I'm trying to automate my test cases using Selenium with the following software applications.我正在尝试使用 Selenium 和以下软件应用程序来自动化我的测试用例。
Here's my script to initialize the driver.这是我初始化驱动程序的脚本。
System.setProperty("webdriver.ie.driver","driver path");
driver = new InternetExplorerDriver();
System.out.println("Driver initialized.");
driver.get("application web url");
For the above script, I'm getting the below error message.对于上述脚本,我收到以下错误消息。
org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session....
I have tried with different versions of drivers and selenium webdriver.我尝试过使用不同版本的驱动程序和 selenium webdriver。 But didn't workout.但是没有锻炼。 What could be the cause and how can I resolve it?可能是什么原因,我该如何解决?
Could anyone give me your suggestions?谁能给我你的建议?
Thanks,谢谢,
Karunagara Pandi G卡鲁纳加拉潘迪 G
This error message...此错误消息...
org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session....
...implies that the IEDriverServer was unable to initiate/spawn a new WebBrowsing Session ie InternetExplorer Browser session. ...意味着IEDriverServer无法启动/生成新的WebBrowsing Session即InternetExplorer 浏览器session。
Your main issue is the incompatibility between the version of the binaries you are using as follows:您的主要问题是您使用的二进制文件版本之间的不兼容,如下所示:
So there is a clear mismatch between Selenium Client v3.12.0 , IEDriverServer v3.150.1 .所以Selenium Client v3.12.0 , IEDriverServer v3.150.1之间存在明显的不匹配。
Test
as a non-root user.以非 root 用户身份执行您的Test
。driver.quit()
within tearDown(){}
method to close & destroy the WebDriver and Web Client instances gracefully.始终在tearDown(){}
方法中调用driver.quit()
以优雅地关闭和销毁WebDriver和Web 客户端实例。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.