From 23f5ee7d27a5bdd3e81012cc0ead9e1f857928e2 Mon Sep 17 00:00:00 2001 From: Thomas Landauer Date: Mon, 16 Nov 2020 07:31:51 +0100 Subject: [PATCH] Document setup using Geckodriver * Update WebDriver.php Adding GeckoDriver standalone. Question: What is `path` in module config? It's not mentioned at https://codeception.com/docs/modules/WebDriver#Configuration. But in my case it was indeed necessary to add it - I got the hint from https://github.com/mozilla/geckodriver/issues/1694#issuecomment-591728668 * Update WebDriver.php --- src/Codeception/Module/WebDriver.php | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/Codeception/Module/WebDriver.php b/src/Codeception/Module/WebDriver.php index 4ad7e83..7e67744 100644 --- a/src/Codeception/Module/WebDriver.php +++ b/src/Codeception/Module/WebDriver.php @@ -84,7 +84,7 @@ * * ### ChromeDriver * - * To run tests in Chrome browser you may connect to ChromeDriver directly, without using Selenium Server. + * To run tests in Chrome/Chromium you may connect to ChromeDriver directly, without using Selenium Server. * * 1. Install [ChromeDriver](https://sites.google.com/a/chromium.org/chromedriver/getting-started). * 2. Launch ChromeDriver: `chromedriver --url-base=/wd/hub` @@ -104,6 +104,24 @@ * * Additional [Chrome options](https://sites.google.com/a/chromium.org/chromedriver/capabilities) can be set in `goog:chromeOptions` capabilities. Note that Selenium 3.8 renamed this capability from `chromeOptions` to `goog:chromeOptions`. * + * ### GeckoDriver + * + * To run tests in Firefox you may connect to GeckoDriver directly, without using Selenium Server. + * + * 1. Install [GeckoDriver](https://github.com/mozilla/geckodriver). + * 2. Launch GeckoDriver: `geckodriver` + * 3. Configure this module: + * + * ```yaml + * modules: + * enabled: + * - WebDriver: + * url: 'http://localhost/' + * browser: firefox + * path: '' + * capabilities: + * acceptInsecureCerts: true # allow self-signed certificates + * ``` * * ### PhantomJS *