Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
runnerBefore(function connectToSelenium() {
const options = {
host: SELENIUM_HOST,
desiredCapabilities: { browserName: BROWSER }
};
rootSuiteBrowser = remote(options).init();
const adapter = new WebdriverIOAdapter(rootSuiteBrowser);
rootSuiteMugshot = new Mugshot(adapter, {
rootDirectory: path.join(__dirname, 'screenshots', BROWSER),
acceptFirstBaseline: false
});
return rootSuiteBrowser;
});
before('Connecting to Selenium', function() {
this.timeout(10 * 1000);
const options = {
host: SELENIUM_HOST,
desiredCapabilities: { browserName: BROWSER }
};
const client = remote(options).init();
const adapter = new WebdriverIOAdapter(client);
mugshot = new Mugshot(adapter, {
rootDirectory: path.join(__dirname, 'screenshots', BROWSER),
acceptFirstBaseline: false
});
global.browser = client;
return client;
});