Commit 6453b949 authored by YuShijiaCode's avatar YuShijiaCode

headless

parent 3b395fb5
......@@ -31,9 +31,9 @@ exports.getDriver = function (webdriver, browser) {
.withCapabilities(chromeCapabilities)
.setChromeService(service)
// Not use headless
// .setChromeOptions(new chrome.Options().addArguments('--no-sandbox',"excludeSwitches=['enable-automation']"))
.setChromeOptions(new chrome.Options().addArguments('--no-sandbox',"excludeSwitches=['enable-automation']"))
// Use headless
.setChromeOptions(new chrome.Options().addArguments("--headless",'--ignore-certificate-errors','window-size=1920,1080','--no-sandbox',"excludeSwitches=['enable-automation']"))
// .setChromeOptions(new chrome.Options().addArguments("--headless",'--ignore-certificate-errors','window-size=1920,1080','--no-sandbox',"excludeSwitches=['enable-automation']"))
.build();
break;
case 'firefox':
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment