Skip to content
This repository has been archived by the owner on Mar 20, 2024. It is now read-only.

#docs - Add docs configurations for ChromeDriver #337

Open
nietzscheson opened this issue Oct 17, 2018 · 2 comments
Open

#docs - Add docs configurations for ChromeDriver #337

nietzscheson opened this issue Oct 17, 2018 · 2 comments

Comments

@nietzscheson
Copy link

nietzscheson commented Oct 17, 2018

Add in doc example of how to get ChromeDriver to work on behat.yml with MinkExtension:

  Behat\MinkExtension:
      base_url: http://example/app_test.php
      default_session: chromedriver
      javascript_session: chromedriver
      browser_name: chrome
      sessions:
           chromedriver:
                    chromedriver: ~
@clemens-tolboom
Copy link

clemens-tolboom commented Aug 18, 2020

Having the above config plus

# composer
...
   "require": {
        "behat/mink-extension": "^2.3",
        "behat/mink-goutte-driver": "^1.2",
        "dmore/chrome-mink-driver": "^2.7"
    },
...

I get

Unrecognized option "chromedriver" under "testwork.mink.sessions.chromedriver". Available options are "appium", "browser_stack", "goutte", "sahi", "sauce_labs", "selenium", "selenium2", "zombie".

which puzzles me for some time now :-(

@pfrenssen
Copy link

I am having success with dmore/behat-chrome-extension together with the standard chromium package for my OS.

composer.json:

{
    "require-dev": {
        "behat/behat": "^3.5",
        "behat/mink-goutte-driver": "^1.2@dev",
        "behat/mink-extension": "^2.1@dev",
        "dmore/behat-chrome-extension": "^1.3"
    }
}

behat.yml:

default:
  extensions:
    DMore\ChromeExtension\Behat\ServiceContainer\ChromeExtension: ~
    Behat\MinkExtension:
      base_url:  'http://localhost:8090'
      sessions:
        default:
          goutte: ~
      javascript_session: chrome
      browser_name: chrome
      chrome:
        api_url: http://localhost:9222

Starting chromium:

# With visible window.
$ chromium --remote-debugging-address=0.0.0.0 --remote-debugging-port=9222

# Headless.
$ chromium --headless --remote-debugging-address=0.0.0.0 --remote-debugging-port=9222

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants