OS: Windows 7 x64
Selenium Version: 3.4.0
Browser: Firefox
Browser Version: 53.0 (64-bit)
setting driver binary path with firefoxOptions
org.openqa.selenium.SessionNotCreatedException: Unable to find a matching set of capabilities
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.
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
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 capabilityfor every test. Downgrading bindings from 3.4.0 to 3.3.3 fixes the issue.