How to use the chromedriver.on function in chromedriver

To help you get started, we’ve selected a few chromedriver examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github alibaba / uirecorder / lib / start.js View on Github external
driver.session(capabilities, function*(error, browser){
        if(error){
            console.log(__('chrome_init_failed').red);
            console.log(error);
            if(/unable to connect to renderer/.test(error)){
                console.log(__('localhost_hosts_tip').red);
            }
            chromedriver.kill();
            chromedriver.on('close', function(){
                process.exit(1);
            });
        }
        else{
            yield browser.config({
                asyncScriptTimeout: 10000
            });
            yield callback(this);
        }
    }).catch(function(e){});
}