Closed damontgomery closed 5 years ago
The behat.yml configuration I tested with looks something like,
behat.yml
default: suites: default: contexts: - FeatureContext - Drupal\DrupalExtension\Context\DrupalContext - Drupal\DrupalExtension\Context\MinkContext - Drupal\DrupalExtension\Context\MessageContext - Drupal\DrupalExtension\Context\DrushContext filters: tags: "~@skipci" gherkin: cache: ~ extensions: Behat\MinkExtension: browser_name: 'chrome' selenium2: wd_host: "http://127.0.0.1:4444/wd/hub" capabilities: { "browserName": "chrome", "browser": "chrome", "version": "62", 'chrome': {'switches':['--no-sandbox', '--headless']}} javascript_session: selenium2 base_url: [INSERT HERE] Drupal\DrupalExtension: blackbox: ~ api_driver: 'drupal' drupal: drupal_root: 'web' text: username_field: 'name' password_field: 'pass' log_out: 'Log out' region_map: anywhere: "*" circle: extensions: Behat\MinkExtension: base_url: [INSERT HERE]:8000
The critical part was,
Behat\MinkExtension: browser_name: 'chrome' selenium2: wd_host: "http://127.0.0.1:4444/wd/hub" capabilities: { "browserName": "chrome", "browser": "chrome", "version": "62", 'chrome': {'switches':['--no-sandbox', '--headless']}} javascript_session: selenium2 base_url: [INSERT HERE]
I also created a Phing script to start the selenium server. I couldn't get it to stay on when I tried to add it to the Ansible part. Maybe someone else has ideas for that.
<target name="start-selenium"> <exec command='java -jar -Dwebdriver.chrome.driver="/usr/local/share/chromedriver/chromedriver" /usr/local/share/selenium/selenium-server-standalone.jar >/dev/null 2>&1 &' dir="/home" /> </target>
The
behat.yml
configuration I tested with looks something like,The critical part was,
I also created a Phing script to start the selenium server. I couldn't get it to stay on when I tried to add it to the Ansible part. Maybe someone else has ideas for that.