Selenium "Unable to find a matching set of capabilities" despite driver being in /usr/local/bin
Updating Firefox and Selenium solved it for me. I don't pretend to have an explanation for the root cause however.
- Updated Firefox 48 → 53
- Updated to Selenium 3.4.1
I also reinstalled/updated Geckodriver
using Homebrew
and explicitly used it as an executable for Selenium WebDriver
, but it turned out that it wasn't necessary to mitigate the "Unable to find matching set of capabilities" error.
I had this same issue, and the problem was related to using Firefox ESR (I'm on Debian). To be more specific, I'm on Debian 10 using 64-bit Firefox 68.11.0esr, python3.7, selenium 3.141.0, and geckodriver 0.27.0.
Here's the standard example I used that failed:
from selenium import webdriver
browser = webdriver.Firefox()
browser.get("http://google.com")
As recommended in this answer, I changed:
browser = webdriver.Firefox()
to
browser = webdriver.Firefox(firefox_binary="/usr/bin/firefox-esr")
and it worked.
If you don't know the path to firefox-esr, you can run sudo find / -name firefox-esr
on the command line. Several should come up.
for me it was enough to just upgrade FF