简体   繁体   English

org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session error with Selenium and IE11 using Java

[英]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 和以下软件应用程序来自动化我的测试用例。

  • WebDriver 3.12.0 WebDriver 3.12.0
  • InternetExplorerDriver3.150.1 InternetExplorerDriver3.150.1
  • IE11 browser IE11浏览器
  • Java1.8.0.231 Java1.8.0.231

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 SessionInternetExplorer 浏览器session。

Your main issue is the incompatibility between the version of the binaries you are using as follows:您的主要问题是您使用的二进制文件版本之间的不兼容,如下所示:

  • Your Selenium WebDriver Client version is 3.12.0 which is a bit older.您的Selenium WebDriver Client版本是3.12.0 ,有点旧。
  • Your InternetExplorerDriver version 3.150.1 .您的InternetExplorerDriver版本3.150.1

So there is a clear mismatch between Selenium Client v3.12.0 , IEDriverServer v3.150.1 .所以Selenium Client v3.12.0IEDriverServer v3.150.1之间存在明显的不匹配。


Solution解决方案

  • Upgrade Selenium to current levels Version 3.141.59 .Selenium升级到当前级别版本 3.141.59
  • Upgrade IEDriverServer to IEDriverServer v3.141.59 or IEDriverServer v3.150.0 level.IEDriverServer升级到IEDriverServer v3.141.59IEDriverServer v3.150.0级别。
  • Clean your Project Workspace through your IDE and Rebuild your project with required dependencies only.通过您的IDE清理您的项目工作区,并仅使用所需的依赖项重建您的项目。
  • Execute your Test as a non-root user.以非 root 用户身份执行您的Test
  • Always invoke driver.quit() within tearDown(){} method to close & destroy the WebDriver and Web Client instances gracefully.始终在tearDown(){}方法中调用driver.quit()以优雅地关闭和销毁WebDriverWeb 客户端实例。

tl; tl; dr博士

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 org.openqa.selenium.remote.UnreachableBrowserException:无法启动新会话 - org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session org.openqa.selenium.remote.UnreachableBrowserException:-错误的硒Java TestNG - org.openqa.selenium.remote.UnreachableBrowserException: - Error selenium Java TestNG org.openqa.selenium.remote.UnreachableBrowserException:无法启动新会话。 可能的原因是远程服务器的地址无效 - org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server 硒 Java org.openqa.selenium.remote.UnreachableBrowserException - Selenium Java org.openqa.selenium.remote.UnreachableBrowserException selenium exceptionin java(org.openqa.selenium.remote.UnreachableBrowserException) - selenium exceptionin java (org.openqa.selenium.remote.UnreachableBrowserException) org.openqa.selenium.remote.UnreachableBrowserException: - org.openqa.selenium.remote.UnreachableBrowserException: org.openqa.selenium.remote.UnreachableBrowserException - org.openqa.selenium.remote.UnreachableBrowserException org.openqa.selenium.remote.UnreachableBrowserException:与远程浏览器通信时出错 - org.openqa.selenium.remote.UnreachableBrowserException: Error communicating with the remote browser 线程“主”中的Selenium异常org.openqa.selenium.remote.UnreachableBrowserException - Selenium Exception in thread “main” org.openqa.selenium.remote.UnreachableBrowserException 线程“主” org.openqa.selenium.remote.UnreachableBrowserException中的异常: - Exception in thread “main” org.openqa.selenium.remote.UnreachableBrowserException:
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM