diff --git a/lib/helper/WebDriver.js b/lib/helper/WebDriver.js index 64cabb5ba..007db5d70 100644 --- a/lib/helper/WebDriver.js +++ b/lib/helper/WebDriver.js @@ -99,6 +99,45 @@ const webRoot = 'body'; * } * ``` * + * ### Internet Explorer + * Additional configuration params can be used from [IE options](https://seleniumhq.github.io/selenium/docs/api/rb/Selenium/WebDriver/IE/Options.html) + * + * ```json + * { + * "helpers": { + * "WebDriver" : { + * "url": "http://localhost", + * "browser": "internet explorer", + * "desiredCapabilities": { + * "ieOptions": { + * "ie.browserCommandLineSwitches": "-private", + * "ie.usePerProcessProxy": true, + * "ie.ensureCleanSession": true, + * } + * } + * } + * } + * } + * ``` + * + * ### Selenoid Options + * + * ```json + * { + * "helpers": { + * "WebDriver" : { + * "url": "http://localhost", + * "browser": "chrome", + * "desiredCapabilities": { + * "selenoidOptions": { + * "enableVNC": true, + * } + * } + * } + * } + * } + * ``` + * * ### Connect through proxy * * CodeceptJS also provides flexible options when you want to execute tests to Selenium servers through proxy. You will @@ -284,6 +323,14 @@ class WebDriver extends Helper { config.capabilities['moz:firefoxOptions'] = config.capabilities.firefoxOptions; delete config.capabilities.firefoxOptions; } + if (config.capabilities.ieOptions) { + config.capabilities['se:ieOptions'] = config.capabilities.ieOptions; + delete config.capabilities.ieOptions; + } + if (config.capabilities.selenoidOptions) { + config.capabilities['selenoid:options'] = config.capabilities.selenoidOptions; + delete config.capabilities.selenoidOptions; + } config.waitForTimeout /= 1000; // convert to seconds