我有一套在chrome上运行正常的测试但是当我将chromeName的功能从chrome更改为firefox时甚至没有得到错误信息
//Before
capabilities: {
'browserName': 'chrome',
'chromeOptions': { args: ['--test-type', 'show-fps-counter=true'] }
},
//After
capabilities: {
'browserName': 'firefox'
},
Run Code Online (Sandbox Code Playgroud)
我发现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"
| 归档时间: |
|
| 查看次数: |
4366 次 |
| 最近记录: |