I'm running chrome (chromium) on a Ubuntu server with the following command:
./chrome --headless --disable-gpu --remote-debugging-address=192.168.0.22 --remote-debugging-port=9222
I can connect to it from my local machine via the web browser and receive the following text in my web browser (not sure if this is the expected output?):
Inspectable WebContents
about:blank
When I attempt to connect to it using Selenium (selenium-chrome-driver 3.3.1), with the following code:
I get the following SessionNotCreatedException:
Apr 08, 2017 7:17:39 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Unable to parse response from server:
Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: Unable to create new remote session. desired capabilities = Capabilities [{browserName=chrome, version=, platform=ANY}], required capabilities = Capabilities [{}]
Build info: version: '3.3.1', revision: '5234b325d5', time: '2017-03-10 09:10:29 +0000'
System info: host: 'XXXX', ip: 'XXXX', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.12.4', java.version: '1.8.0_40' Driver info: driver.version: RemoteWebDriver
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:126)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:141)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:604)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:244)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:131)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:158)
If I purposely put in an incorrect IP address I get a UnreachableBrowserException, so I know it's reaching the server.
What am I do wrong? Thanks in advance!