Last active
August 25, 2020 17:45
-
-
Save seleniumgists/df5d2b1a0e5554696d579a013e924236 to your computer and use it in GitHub Desktop.
generated automatically from #selenium on seleniumhq slack
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { Builder, Capabilities } = require('selenium-webdriver'); | |
//var firefox = require('selenium-webdriver/firefox'); | |
const chrome = require('selenium-webdriver/chrome'); | |
const chromeOptions = new chrome.Options(); | |
chromeOptions.addArguments(["--ignore-certificate-errors", | |
"--allow-running-insecure-content", | |
"--disable-extensions", | |
"--start-maximized"]); | |
var chromeCapabilities = Capabilities.chrome(); | |
chromeCapabilities.set('chromeOptions', chromeOptions); | |
function CustomWorld() { | |
console.log(chromeOptions); | |
console.log(chromeCapabilities); | |
this.driver = new Builder() | |
.forBrowser('chrome') | |
.setChromeOptions(chromeOptions) | |
.withCapabilities(chromeCapabilities) | |
.usingServer('https://zalenium.qa3.demark.io/wd/hub') | |
.build(); | |
} | |
module.exports = function() { | |
this.World = CustomWorld; | |
this.setDefaultTimeout(30 * 1000); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment