WebDriverIO Selenium从config.js文件将命令行参数传递给Chrome [英] WebDriverIO Selenium pass command line arguments into Chrome from config.js file
本文介绍了WebDriverIO Selenium从config.js文件将命令行参数传递给Chrome的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要chrome才能在UI测试中使用disable-web-security标志运行.如何使用wdio.config文件( http://webdriver.io/)注入任何命令.
I need chrome to run with disable-web-security flag for my UI tests. How can I inject any commands using wdio.config file (http://webdriver.io/).
capabilities: [{
browserName: 'chrome'
}]
推荐答案
您可以使用goog:chromeOptions
capabilities: [{
browserName: 'chrome',
'goog:chromeOptions': {
args: ['disable-web-security']
}
}]
查看 chromedriver文档,以获取有关chromeOptions的更多信息对象.
Check out the chromedriver docs for more information on the chromeOptions object.
这篇关于WebDriverIO Selenium从config.js文件将命令行参数传递给Chrome的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文