giorgiosironi / phpunit-selenium

Selenium RC integration for PHPUnit
http://www.phpunit.de/
Other
601 stars 270 forks source link

Driver info: driver.version: unknown #421

Closed lolalola22 closed 4 years ago

lolalola22 commented 6 years ago

Hi, When i run PHP selenium test got error: java.net.SocketTimeoutException: timeout

Error code from test:

PHPUnit_Extensions_Selenium2TestCase_WebDriverException: Unable to create session from org.openqa.selenium.remote.NewSessionPayload@73538d47
Build info: version: '3.9.0', revision: '698b3178f0', time: '2018-02-05T14:56:13.134Z'
System info: host: 'lamp-s-1vcpu-1gb-fra1-01', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-109-generic', java.version: '1.8.0_151'
Driver info: driver.version: unknown

System info: Ubuntu 16.04 Google Chrome 64.0.3282.186 Chrome driver 2.35 Selenium server standalone 3.9.0

Very strange, but the Selenium server found chrome drivers: "Starting ChromeDriver 2.35.528139 (47ead77cb35ad2a9a83248b292151462a66cd881) on port 8879"

Detail info:

10:13:24.496 INFO - Selenium build info: version: '3.9.0', revision: '698b3178f0'
10:13:24.502 INFO - Launching a standalone Selenium Server on port 4444
2018-03-04 10:13:24.947:INFO::main: Logging initialized @1774ms to org.seleniumhq.jetty9.util.log.StdErrLog
2018-03-04 10:13:25.455:INFO:osjs.Server:main: jetty-9.4.7.v20170914, build timestamp: 2017-11-21T21:27:37Z, git hash: 82b8fb23f757335bb3329d540ce37a2a2615f0a8
2018-03-04 10:13:25.553:WARN:osjs.SecurityHandler:main: ServletContext@o.s.j.s.ServletContextHandler@7791a895{/,null,STARTING} has uncovered http methods for path: /
2018-03-04 10:13:25.567:INFO:osjsh.ContextHandler:main: Started o.s.j.s.ServletContextHandler@7791a895{/,null,AVAILABLE}
2018-03-04 10:13:25.672:INFO:osjs.AbstractConnector:main: Started ServerConnector@7152251d{HTTP/1.1,[http/1.1]}{0.0.0.0:4444}
2018-03-04 10:13:25.679:INFO:osjs.Server:main: Started @2506ms
10:13:25.679 INFO - Selenium Server is up and running on port 4444
2018-03-04 10:16:23.711:INFO:osjshC.ROOT:qtp472654579-9: org.openqa.selenium.remote.server.WebDriverServlet-26653222: Initialising WebDriverServlet
10:16:23.986 INFO - Found handler: org.openqa.selenium.remote.server.commandhandler.BeginSession@13cc69b6
10:16:24.003 INFO - /session: Executing POST on /session (handler: BeginSession)
10:16:24.323 INFO - Capabilities are: Capabilities {browserName: chrome}
10:16:24.334 INFO - Capabilities {browserName: chrome} matched class org.openqa.selenium.remote.server.ServicedSession$Factory (provider: org.openqa.selenium.chrome.ChromeDriverService)
Starting ChromeDriver 2.35.528139 (47ead77cb35ad2a9a83248b292151462a66cd881) on port 8879
Remote connections are allowed by a whitelist (localhost,127.0.0.1,200.100.100.100).
10:16:35.607 WARN - Read timed out
java.net.SocketTimeoutException: Read timed out

What can be wrong? Thanks

Echron commented 6 years ago

I had the same issue, after changing browserName to "chrome" instead of "Chrome" it started to work:

public static $browsers = [
    [
        'browserName' => 'chrome',
        'browser'     => 'chrome',
        'host'        => 'xxx.xxx.xxx.xxx',
        'port'        => 4444,
        'timeout'     => 2000,
    ],
];