我有一组在 chrome 上运行良好的测试,但是当我将功能 browserName 从 chrome 更改为 firefox 时,甚至没有收到错误信息
//Before
capabilities: {
'browserName': 'chrome',
'chromeOptions': { args: ['--test-type', 'show-fps-counter=true'] }
},
//After
capabilities: {
'browserName': 'firefox'
},
我发现firefox的问题,基本上我的量角器配置没有使用任何webdriver服务器设置,而是使用默认服务器,这种方式非常方便,因为我自己没有启动selenium
为了解决这个问题,我自己启动 selenium 服务器,指定 firefox 和 chrome 驱动程序
java -jar "C:\Users\%USERNAME%\AppData\Roaming\npm\node_modules\protractor\selenium\selenium-server-standalone-2.42.1.jar" -Dwebdriver.chrome.driver="C:\Users\ %USERNAME%\AppData\Roaming\npm\node_modules\protractor\selenium\chromedriver.exe" -Dwebdriver.firefox.bin="C:\Users\%USERNAME%\AppData\Local\Mozilla Firefox\firefox.exe"
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)