Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function initBrowser() {
wdio.run(initCrawlProfile, err => {
if (err) {
spinnerCrawl.fail(chalk.red(err.message));
}
while (listProfileName.length) {
loadProfile();
}
browser.end();
process.exit();
});
}
const spinnerCrawl = ora('Init crawl!');
const options = {
deprecationWarnings: false,
capabilities: {
browserName: 'chrome',
chromeOptions: {
args: [
'--headless',
'--disable-gpu',
'--dns-prefetch-disable',
'--window-size=1920,1080',
],
},
},
};
const browser = wdio.getBrowser();
let listProfileName = [];
/**
* Init selenium with chrome on headless mode
*/
module.exports = {
start(listName, data) {
spinnerCrawl.start();
listProfileName = listName;
selenium.install(
{
version: '3.0.1',
baseURL: 'https://selenium-release.storage.googleapis.com',
drivers: {
chrome: {
version: '2.15',