Search code examples
seleniumgoogle-chromeselenium-chromedriverselenium-gridzalenium

Zalenium launches chrome browser but doesn't kicks off test


I'm trying to run my test scripts on zalenium, though the browser gets launched(noticed in vnc) but the tests don't run on the container. I have noticed the below error in logs.

Selenium version:

 <dependency>
                <groupId>org.seleniumhq.selenium</groupId>
                <artifactId>selenium-server</artifactId>
                <version>3.0.1</version>
            </dependency>

            <dependency>
                <groupId>org.seleniumhq.selenium</groupId>
                <artifactId>selenium-java</artifactId>
                <version>3.0.1</version>
            </dependency>

Selenium Logs :

org.openqa.selenium.SessionNotCreatedException: Unable to create new remote session. desired capabilities = Capabilities [{name=TestCaseName, browserName=chrome, platform=LINUX}], required capabilities = Capabilities [{}] Build info: version: '3.0.1', revision: '1969d75', time: '2016-10-18 09:49:13 -0700'

Docker Logs :

WARN o.s.jetty9.server.HttpChannel - /wd/hub/session java.io.IOException: org.openqa.grid.common.exception.GridException: No capabilities found in request: {"capabilities": {"desiredCapabilities": {"name":"TestcaseName","browserName":"chrome","platform":"LINUX"},"requiredCapabilities": {}}}


Solution

  • This error message...

    org.openqa.selenium.SessionNotCreatedException: Unable to create new remote session.
    

    ...implies that the ChromeDriver was unable to initiate/spawn a new WebBrowser i.e. Chrome Browser session.

    It was evident from your maven dependency and the log messages that you are using Selenium v3.0.1


    Factually, there is no concrete indication within either the Selenium Logs or the Docker Logs to identify any root cause of the issue sans the SessionNotCreatedException. In case of SessionNotCreatedException the primary suspect is always towards the incompatibility between the version of the binaries you are using and it is always advisable to update the following binaries:

    • Selenium JARs (v3.141.59)
    • ChromeDriver (v75.0)
    • Chrome Browser (v75.0)