Protractor 量角器测试未在Firefox上启动

Protractor 量角器测试未在Firefox上启动,protractor,Protractor,我有一套在chrome上运行良好的测试,但当我将browserName的功能从chrome更改为firefox时,甚至没有得到错误信息 //Before capabilities: { 'browserName': 'chrome', 'chromeOptions': { args: ['--test-type', 'show-fps-counter=true'] } }, //After capabilities: {

我有一套在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\u modules\dragrator\selenium\selenium-server-standalone-2.42.1.jar”-Dwebdriver.chrome.driver=“C:\Users\%USERNAME%\AppData\Roaming\npm\node\u modules\dragrator\selenium\chromedriver.exe”-Dwebdriver.firefox.bin=“C:\Users\%USERNAME%\AppData\Local\Mozilla firefox\firefox.exe”


看起来,Gragotor不支持Firefox35,36,所以一个解决办法是下载并通过添加

"firefox_binary": "path/to/custom/firefox"
"binary_": "path/to/custom/firefox"
在您的conf文件中