How to use the chromedriver.kill 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){});
}
github alibaba / uirecorder / lib / start.js View on Github external
}
                console.log(__('recorder_server_closed').green);
                console.log(__('recorder_browser_closed').green);
                if(checkerBrowser){
                    checkerBrowser.close(function(){
                        checkerBrowser = null;
                        console.log(__('checker_browser_closed').green);
                        chromedriver.kill();
                        chromedriver.kill();
                        chromedriver.on('close', function(){
                            process.exit();
                        });
                    });
                }
                else{
                    chromedriver.kill();
                    chromedriver.on('close', function(){
                        process.exit();
                    });
                }
            });
        }