Open ThomasLandauer opened 2 years ago
Facebook WebDriver (now PHP WebDriver - https://github.com/php-webdriver/php-webdriver) is PHP library, there is nothing to ping.
If ChromeDriver is not reachable, you get ConnectionException Can't connect to WebDriver at localhost:4444. Make sure that ChromeDriver, GeckoDriver or Selenium Server is running.
on session creation.
If session creation succeeded but some later request fails, you get \Facebook\WebDriver\Exception\WebDriverCurlException
.
If ChromeDriver fails to launch Chrome, you get something like Could not start a new session. Could not start a new session. Error while creating session with the driver service. Stopping driver service: Driver server process died prematurely.
See https://github.com/Codeception/module-webdriver/issues/112 as example.
I just spent several hours trying to get ChromeDriver connect with a snap installation of Chromium (default on ubuntu nowadays), and the error message I got was:
[Facebook\WebDriver\Exception\WebDriverException] JSON decoding of remote response failed. Error code: 4 The response: 'unhandled request'
I'm guessing that ChromeDriver was responding with some error message, and WebDriver wasn't able to parse that.
=> My plan would be to explain these questions at https://codeception.com/docs/modules/WebDriver
Regarding snap: I came to the conclusion that it's not compatible and installed a deb
package of Chromium ;-)
Yes, Facebook WebDriver is very bad at handling unexpected responses.
Most likely 'unhandled request' is the raw response that you want to get.
@Naktibalda If webdriver isn't getting a connection to the browser, is there a way to debug the interplay between the involved components: Codeception <-> Facebook WebDriver <-> chromedriver <-> chrome? I.e. is there a way to "ping" Facebook WebDriver from Codeception? Then ping chromedriver, etc.?