当我的测试用例正在运行时,会话将在10分钟后自动停止。
INFO [ActiveSessions $ 1.onStop]-删除会话fbd843ab66cb10a21d00b07eb4466970(org.openqa.selenium.chrome.ChromeDriverService)
有什么方法可以不自动停止或延长时间吗? conf.js文件如下。谢谢。
//文件:conf.js
exports.config = { 框架:“茉莉花”, seleniumAddress:“ http://localhost:4444/wd/hub”,
// set default time out for pending asynchronous tasks in Angular application 60 mins
allScriptsTimeout: 3600000,
// Options to be passed to Jasmine-node.
jasmineNodeOpts: {
isVerbose: true,
// use colors in the command line report.
showColors: true,
// override jasmine.DEFAULT_TIMEOUT_INTERVAL for asynchronous callback
defaultTimeoutInterval: 3600000
},
onPrepare: () =>{
browser.ignoreSynchronization = false;
browser.driver.manage().window().maximize();
let origFn = browser.driver.controlFlow().execute;
// set protractor wait time
browser.driver.controlFlow().execute = function () {
let args = arguments;
// queue 100ms wait
origFn.call(browser.driver.controlFlow(), () => {
return protractor.promise.delayed(100);
});
return origFn.apply(browser.driver.controlFlow(), args);
};
},
capabilities: {
'browserName': 'chrome',
'platform': 'ANY',
'version': 'ANY',
'shardTestFiles': false,
'chromeOptions': {
args: ['--no-sandbox', '--test-type=browser', 'disable-infobars'],
prefs: {
'download': {
'prompt_for_download': false
}
}
}
},
// command line params
params: {
all: '',
},
// Specify the name of the specs files.
specs: ['./tests/link.js'],
// Run specified suites: protractor conf.js --suite portfolio
suites: {
all: 'tests/*'
}
}