Created
December 29, 2017 09:00
-
-
Save apdarshan/2f22cd4612db3748c149da9215cc51fe to your computer and use it in GitHub Desktop.
WebdriverIO in Chrome Headless using chromedriver
This file contains 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
process.env['PLATFORM_ARCH_OVERRIDE'] = 'x64'; | |
const webdriverio = require('webdriverio'); | |
const chromedriver = require('chromedriver'); //using https://www.npmjs.com/package/chromedriver | |
const PORT = 9515; | |
chromedriver.start([ | |
'--url-base=wd/hub', | |
`--port=${PORT}`, | |
'--verbose' | |
]); | |
const opts = { | |
port: PORT, | |
desiredCapabilities: { | |
browserName: 'chrome', | |
chromeOptions: {args: ['--headless']} | |
} | |
}; | |
browser = webdriverio.remote(opts).init(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment