Behat / MinkExtension

Mink extension (tight integration and configuration) for Behat
MIT License
636 stars 279 forks source link

Error with Chrome: Could not open Connection: Webdriver http error 400 during behat tests #359

Closed ChrisPP20 closed 4 years ago

ChrisPP20 commented 4 years ago

I get this error message on all my Behat tests:

┌─ @BeforeScenario # Drupal\degov\Behat\Context\DrupalIndependentContext::beforeScenario()
  │
  ╳  Could not open connection: Webdriver http error: 400, payload :unhandled request (Behat\Mink\Exception\DriverException)
  │
  Scenario: xyz...

I am using the official ChromeDriver from https://chromedriver.chromium.org/ and a ddev environment on Ubuntu 18.04. Behat Versions: behat/behat v3.6.1 behat/gherkin v4.6.0 behat/mink v1.7.1 behat/mink-browserkit-driver 1.3.3 behat/mink-extension 2.3.1 behat/mink-goutte-driver v1.2.1 behat/mink-selenium2-driver v1.3.1 behat/transliterator v1.3.0

The relevant part of behat.yml config looks as follow:

  extensions:
    Behat\MinkExtension:
      base_url: http://mysite:80
      default_session: selenium_chrome
      sessions:
        selenium_chrome:
          selenium2:
            wd_host: http://localhost:4444/wd/hub
            browser: chrome
            capabilities:
              extra_capabilities:
                chromeOptions:
                  args:
                    - "--no-sandbox"

Adding (w3c: false) into chromeOptions dont change anything. Any idea why my docker container cant connect with the Chrome Driver?