Selenium: Not able to set DesiredCapabilities for firefox 53.0 with selenium 3.4.0 and geckdriver 0.16.0

Created on 24 Apr 2017  路  7Comments  路  Source: SeleniumHQ/selenium

Meta -

OS: Windows 7 x64

Selenium Version: 3.4.0

Browser: Firefox

Browser Version: 53.0 (64-bit)

Expected Behavior -

setting driver binary path with firefoxOptions

Actual Behavior -

org.openqa.selenium.SessionNotCreatedException: Unable to find a matching set of capabilities

Steps to reproduce -

FirefoxProfile firefoxProfile = new FirefoxProfile();
firefoxProfile.setPreference("enableNativeEvents", true);

FirefoxOptions options = new FirefoxOptions();
options.setBinary(browserBinary);
options.toCapabilities();

DesiredCapabilities desired = DesiredCapabilities.firefox();
desired.setCapability("browserName", "firefox");
desired.setCapability("browserVersion", "53.0");
desired.setCapability("platformName", "Windows");           
desired.setCapability(CapabilityType.ForSeleniumServer.ENSURING_CLEAN_SESSION, true);
System.setProperty("webdriver.gecko.driver", driverBinary);

this returns org.openqa.selenium.SessionNotCreatedException: Unable to find a matching set of capabilities

Tried a variety of ways to set-up browser binary and all without positive outcome.
This:

FirefoxOptions options = new FirefoxOptions();
...
desired.setCapability(FirefoxOptions.FIREFOX_OPTIONS, options.setBinary(driverBinary));

returns the same exception.

Most helpful comment

I might be running into the same issue with Python bindings. Upgrading to the latest geckodriver (0.16.0) produces WebDriverException: Message: marionette was not a the name of a known capability or a valid extension capability for every test. Downgrading bindings from 3.4.0 to 3.3.3 fixes the issue.

All 7 comments

So basically if we create a new FirefoxDriver() and provide capabilities as argument, we always get the above mentioned exception (Unable to find a matching set of capabilities)
If we create new FirefoxDriver() and provide options as an argument to it, then the driver is able to build.

new FirefoxOptions().addCapabilities() also returns the aforementioned exception.

Changing the title as this issue is with using all desired capabilities.

I might be running into the same issue with Python bindings. Upgrading to the latest geckodriver (0.16.0) produces WebDriverException: Message: marionette was not a the name of a known capability or a valid extension capability for every test. Downgrading bindings from 3.4.0 to 3.3.3 fixes the issue.

Do you run it locally (FirefoxDriver) or remotely (RemoteWebDriver)?

@barancev Locally

Duplicate of issue #3884

Any reason for closing this issue? Today I upgraded to Selenium 3.4 and I got the exactly same issue with above mentioned versions.

Since this is a duplicate as you stated and the issue is in GeckoDriver not selenium

Was this page helpful?
0 / 5 - 0 ratings

Related issues

giacgbj picture giacgbj  路  4Comments

gauntface picture gauntface  路  3Comments

jasonfb picture jasonfb  路  3Comments

gchr picture gchr  路  3Comments

naco-siren picture naco-siren  路  3Comments