Selenium web driver for Firefox error: Unable to find a matching set of capabilities

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')

 

Message: Unable to find a matching set of capabilities
Message: Unable to find a matching set of capabilities

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:

32-bit Gecko driver running
32-bit Gecko driver running

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:

Don't forget to update the PATH environment variable for the Geckodriver
Don’t forget to update the PATH environment variable for the Geckodriver

Now, when I re-run the test script it works as it should:

Running the selenium webdriver

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Website Built with WordPress.com.

Up ↑

%d bloggers like this: