I am running tests on selenium grid using nunit C# with:
Firefox is not installed on the default location and so I get following exception on running tests:
Expected browser binary location, but unable to find binary in default location, no 'moz:firefoxOptions.binary' capability provided, and no binary flag set on the command line (WARNING: The server did not provide any stacktrace information)
I want to specify Firefox executable path on the capabilities section of node.config
file of selenium grid. How do I do that with new geckodriver?
firefox_binary
is now obsolete and it uses "moz:firefoxOptions"
, but I don't know how to specify it in selenium node's config file.
This is what I am doing in the config file, but its not working:
{
"capabilities":
[
{
"platform": "WINDOWS",
"browserName": "firefox",
"moz:firefoxOptions": {
"binary": "D:\\Browsers\\Mozilla Firefox\\firefox.exe"
},
"maxInstances": 1,
"seleniumProtocol": "WebDriver"
}
]
.........
I was able to solve it by adding firefox executable folder path to PATH
system environment variable. Once you add the path to PATH
environment variable its not necessary to add it to node.config