RemoteWebdriver - Could not start a new session

823 views Asked by At

I try to execute my testcase remotely. I used these commands on server to run Xvfb:

Xvfb :3 -screen 5 1024x768x8 &
export DISPLAY=:3.5

After that I tried to start Selenium standalone server, but this command failed:

java -jar selenium-server-standalone-3.5.2.jar -Dwebdriver.chrome.bin=/path/to/google-chrome -Dwebdriver.chrome.driver=/path/to/chromedriver

So I used this one:

java -jar selenium-server-standalone-3.5.2.jar

I get following log in terminal:

09:27:33.239 INFO - Selenium build info: version: '3.5.2', revision: '10229a9020'
09:27:33.244 INFO - Launching a standalone Selenium Server
2017-09-13 09:27:34.207:INFO::main: Logging initialized @11716ms to org.seleniumhq.jetty9.util.log.StdErrLog
09:27:36.112 INFO - Driver class not found: com.opera.core.systems.OperaDriver
09:27:37.714 INFO - Driver provider class org.openqa.selenium.ie.InternetExplorerDriver registration is skipped:
 registration capabilities Capabilities [{ensureCleanSession=true, browserName=internet explorer, version=, platform=WINDOWS}] does not match the current platform LINUX
09:27:37.714 INFO - Driver provider class org.openqa.selenium.edge.EdgeDriver registration is skipped:
 registration capabilities Capabilities [{browserName=MicrosoftEdge, version=, platform=WINDOWS}] does not match the current platform LINUX
09:27:37.715 INFO - Driver provider class org.openqa.selenium.safari.SafariDriver registration is skipped:
 registration capabilities Capabilities [{browserName=safari, version=, platform=MAC}] does not match the current platform LINUX
09:27:38.432 INFO - Using the passthrough mode handler
2017-09-13 09:27:38.819:INFO:osjs.Server:main: jetty-9.4.5.v20170502
2017-09-13 09:27:38.929:WARN:osjs.SecurityHandler:main: [email protected]@6536e911{/,null,STARTING} has uncovered http methods for path: /
2017-09-13 09:27:39.005:INFO:osjsh.ContextHandler:main: Started o.s.j.s.ServletContextHandler@6536e911{/,null,AVAILABLE}
2017-09-13 09:27:39.128:INFO:osjs.AbstractConnector:main: Started ServerConnector@63e2203c{HTTP/1.1,[http/1.1]}{0.0.0.0:4444}
2017-09-13 09:27:39.136:INFO:osjs.Server:main: Started @16646ms
09:27:39.136 INFO - Selenium Server is up and running

I initialized Webdriver variable as follows:

driver = new RemoteWebDriver(new URL("http://<my-server-ip>:444/wd/hub"),caps);

I executed project and got following 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. Build info: version: '3.5.2', revision: '10229a9'

How could I set, which browser should be started remotely? How could I start a new session?

0

There are 0 answers