selenium.common.exceptions.SessionNotCreatedException: Message: Unable to find a matching set of capabilities with Firefox 46 through Selenium
As you are using Selenium 3.8.0 you have to use GeckoDriver as a mandatory. But again as you are using Firefox v46.0 you have to set the capability marionette as False
through DesiredCapabilities()
as follows :
from selenium import webdriverfrom selenium.webdriver.common.desired_capabilities import DesiredCapabilitiescap = DesiredCapabilities().FIREFOXcap["marionette"] = Falsebrowser = webdriver.Firefox(capabilities=cap, executable_path="C:\\path\\to\\geckodriver.exe")browser.get('http://google.com/')browser.quit()
If you're going to use Geckodriver, you definitely need to use a newer version of Firefox. Frex: https://github.com/mozilla/geckodriver/releases/tag/v0.19.0 lists FF55 or greater.
If you plan on using FF46, don't use geckodriver. Update your capabilities to have marionette set to False:
caps = DesiredCapabilities.FIREFOX.copy()caps['marionette'] = Falsedriver=webdriver.Firefox(capabilities=caps)
I had this issue on my MacOS 10.5 Catalina.What I did:1. Installed the geckodriver using brew install geckodriver
2. Deleted/uninstalled my existing(OLD) Firefox browser (v.46) and installed v70.3. tried:
from selenium import webdriverbrowser = webdriver.Firefox()browser.get('http://google.com')
The above worked fine with no errors, by launching Firefox and loading google.com