UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server with Selenium Grid

后端 未结 1 1340
渐次进展
渐次进展 2020-12-17 05:43

Error in opening new driver window:

org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid addres         


        
相关标签:
1条回答
  • 2020-12-17 06:34

    This error message...

    org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
    

    and the server log...

    Forwarding newSession on session null to remote
    

    ...implies that the Selenium Grid Hub / Selenium Grid Node wasn't properly initiated/started. As a result a null session was forwarded to the RemoteWebDriver.


    Some more information regarding the versions of the binaries which you have used interms of Selenium server/client, WebDriver variant /version and WebBrowser variant /version and the commands you have used to initiate the Selenium Grid Hub / Selenium Grid Node would have helped us to debug your issue in a easier way.

    However this issue can happen due to multiple factors as follows:

    • You are using the uri 5555/wd/hub, so ensure that Selenium Grid Hub is initiated on port 5555.
    • You may opt to replace the capability argument with an instance of Options class as follows:

      DesiredCapabilities caps = new DesiredCapabilities();
      caps.setCapability("browser", "chrome");
      //seting the required capabilities
      ChromeOptions options = new ChromeOptions();
      options.merge(caps);
      WebDriver driver = new RemoteWebDriver((new URL( "http://"+ip+":5555/wd/hub")), options);        
      
    • You can find a relevant discussion in Remote WebDriver UnreachableBrowserException: Could not start a new session

    • This issue is frequently observed with GeckoDriver/Selenium/Mozilla due to version mismatch of the binaries you are using. As a thumb rule always follow the configuration matrix from the GeckoDriver, Selenium and Firefox Browser compatibility chart

    supported_platforms_geckodriver_24

    • You can find a relevant discussion in WebDriverException: Message: newSession with GeckoDriver Firefox v65 and Selenium through Python 3.7
    0 讨论(0)
提交回复
热议问题