The error “Unable to find a matching set of capabilities” when running the test script below may be caused by installing the wrong version of the Selenium web driver for Firefox:
from selenium import webdriver browser= webdriver.Firefox() browser.get('http://www.seleniumhq.org')
I have FireFox 64-bit edition on my system, but installed the 32-bit gecko driver. This caused the above error: Unable to find a matching set of capabilities.
You can see the 32-bit gecko driver still running on my system:
Make sure to:
- Install the 64-bit gecko driver if you are using Firefox 64-bit edition.
- Install the 32-bit gecko driver if you are using Firefox 32-bit edition.
In my case I needed to installed the 64-bit gecko driver.
I killed the geckodriver.exe (32-bit) process first, then installed the 64-bit gecko driver into the following folder: C:\Program Files\Geckodriver\. Don’t forget to update the PATH environment variable:
Now, when I re-run the test script it works as it should: