This service help you to run chromedriver from npm package or from local install when runnings test with WDIO.
Install @coorpacademy/wdio-chromedriver-service
and chromedriver
packages.
npm install --save-dev @coorpacademy/wdio-chromedriver-service chromedriver
Adds service in wdio.config.js
const ChromeDriverService = require('@coorpacademy/wdio-chromedriver-service');
exports.config = {
host: '0.0.0.0',
port: 9515,
path: '/',
services: [[ChromeDriverService, {}]],
chromeDriverArgs: ['--port=9516'],
chromeDriverPath: '/usr/bin/chromedriver',
capabilities: [
{
browserName: 'chrome',
chromeOptions: {
args: ['--headless', '--disable-gpu', '--no-sandbox']
}
}
]
};
Array of arguments to pass to the ChromeDriver executable, see https://helpmanual.io/help/chromedriver.
Type: string[]
Path of chromedriver bin. Overwrite this value to use local chromedriver install.
Type: string