elgalu / docker-selenium

[NOT MAINTAINED] Please use <https://github.com/SeleniumHQ/docker-selenium>
https://github.com/SeleniumHQ/docker-selenium
Other
1.42k stars 334 forks source link

Latest version breaks behat/mink #328

Closed forest-ep closed 5 years ago

forest-ep commented 5 years ago

Running zalenium in K8s with default settings, which means using elgalu/selenium:latest for chrome/firefox pods.

We have behat tests set up to run parallel tests. Everything started failing since the latest release 3.141.59-p15.

Error trace:

Could not open connection: Payload received from webdriver is valid but unexpected json: { "value": { "sessionId": "9481047ad067539cf985523d24b66e33", "capabilities": { "acceptInsecureCerts": false, "browserName": "chrome", "browserVersion": "75.0.3770.80", "chrome": { "chromedriverVersion": "75.0.3770.8 (681f24ea911fe754973dda2fdc6d2a2e159dd300-refs\u002fbranch-heads\u002f3770@{#40})", "userDataDir": "\u002ftmp\u002f.com.google.Chrome.C766Hh" }, "goog:chromeOptions": { "debuggerAddress": "localhost:44023" }, "networkConnectionEnabled": false, "pageLoadStrategy": "normal", "platformName": "linux", "proxy": { }, "setWindowRect": true, "strictFileInteractability": false, "timeouts": { "implicit": 0, "pageLoad": 300000, "script": 30000 }, "unhandledPromptBehavior": "dismiss and notify", "webdriver.remote.sessionid": "9481047ad067539cf985523d24b66e33" } } } (Behat\Mink\Exception\DriverException)

So the payload is missing 'status', which triggers an error in instaclick/php-webdriver (required by behat/mink).

if (is_array($result) && !array_key_exists('status', $result)) { throw WebDriverException::factory( WebDriverException::CURL_EXEC, 'Payload received from webdriver is valid but unexpected json: ' . substr($rawResult, 0, 1000) ); }

Reverted back to last verison in zalenium helm with seleniumImageName: "elgalu/selenium:3.141.59-p14", and things start to work again.

Image version

diemol commented 5 years ago

@forest-ep

From ChromeDriver & Chrome 75 and up, it will default to W3C mode, see release notes: https://chromedriver.storage.googleapis.com/75.0.3770.8/notes.txt

It means that all commands must be W3C complaint, if you still need time to update your test scripts, you can pass w3c: false inside the goog:chromeOptions block. Take into account that the flag will probably be removed in future ChromeDriver releases.

Gonzalo2683 commented 4 years ago

I have the same problem, what would be the solution for this problem? What did you do @forest-ep ?

forest-ep commented 4 years ago

@Gonzalo2683 w3c: false fixes the issue for the moment

Gonzalo2683 commented 4 years ago

@forest-ep Sorry for my ignorance, I'm pretty new to this, but where should I put this setting?

forest-ep commented 4 years ago

@Gonzalo2683 in your yml config, capabilities: {"browser" :"Chrome", "extra_capabilities":{"idleTimeout":300, "chromeOptions":{"w3c":false}}}