Protractor test is not starting on Firefox

六月ゝ 毕业季﹏ 提交于 2019-12-22 07:01:28

问题


I have got a set of test that run fine on chrome but when I change the capabilities browserName from chrome to firefox don't even get a error info

//Before
   capabilities: {
         'browserName': 'chrome',
         'chromeOptions': { args: ['--test-type', 'show-fps-counter=true'] }
    },

//After
   capabilities: {
          'browserName': 'firefox'
    },

回答1:


I found the problem with firefox, basically my protractor config was not using any webdriver server setting but was using the default server, this way was quite handy since did not have start selenium by my self

In order to fix this issue I am starting selenium server by myself spesifiying firefox and chrome drivers

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"




回答2:


It seems that firefox 35,36 is not supported by protractor so one workaround is to download firefox 34 here and set its path by adding

"firefox_binary": "path/to/custom/firefox"
"binary_": "path/to/custom/firefox"

in your conf file as stated here by @6220119



来源:https://stackoverflow.com/questions/23991370/protractor-test-is-not-starting-on-firefox

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!