我该如何配置量角器Firefox的二进制文件的位置? [英] How can I configure the firefox binary location in Protractor?
问题描述
我成功运行Chrome浏览器测试量角器,使用下面的部分,我量角器配置中指定的路径,我的Chrome二进制文件:
I am successfully running Protractor tests with Chrome, specifying the path to my chrome binary using the following section in my Protractor configuration:
capabilities: {
// You can use other browsers
// like firefox, phantoms, safari, IE
'browserName': 'chrome',
"chromeOptions": {
binary: 'C:/BuildSoftware/Chrome/Application/chrome.exe',
}
这工作。
我的Firefox也安装在一个非标准的位置。
My Firefox is also installed in a non-standard location.
有没有指定量角器配置用于Firefox的二进制等价的方式?
Is there an equivalent way to specify the binary for Firefox in the protractor config?
推荐答案
看来你不得不自己与Firefox的驱动程序自定义的参数来启动Selenium服务器。
见<一href=\"http://stackoverflow.com/questions/23991370/protractor-test-is-not-starting-on-firefox\">Protractor测试没有启动火狐
It seems you have to start the Selenium Server by yourself with custom arguments for firefox driver. See Protractor test is not starting on Firefox
更多用于Firefox的驱动程序(包括自定义Firefox的二进制文件位置)选项都可以在这里找到:
的https://$c$c.google.com/p/selenium/wiki / FirefoxDriver
More options for firefox driver (including custom firefox binary location) can be found here: https://code.google.com/p/selenium/wiki/FirefoxDriver
P / S:浏览Firefox的驱动程序源透露更多的光:
<一href=\"https://$c$c.google.com/p/selenium/source/browse/javascript/node/selenium-webdriver/firefox/index.js\" rel=\"nofollow\">https://$c$c.google.com/p/selenium/source/browse/javascript/node/selenium-webdriver/firefox/index.js
P/S: Browsing the firefox driver source reveals more light: https://code.google.com/p/selenium/source/browse/javascript/node/selenium-webdriver/firefox/index.js
您可以尝试添加:
"browserName": "firefox",
"firefox_binary": "path/to/custom/firefox",
"binary_": "path/to/custom/firefox"
这篇关于我该如何配置量角器Firefox的二进制文件的位置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!