Error reporting in Firefox using selenium in Python

python error in Firefox with selenium:

Traceback (most recent call last):
File “G:\python_work\chapter11\”, line 10, in <module>
driver = webdriver.Firefox()
File “C:\Python34\lib\site-packages\selenium\webdriver\firefox\”, line 154, in __init__
File “C:\Python34\lib\site-packages\selenium\webdriver\remote\”, line 140, in __init__
self.start_session(desired_capabilities, browser_profile)
File “C:\Python34\lib\site-packages\selenium\webdriver\remote\”, line 229, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File “C:\Python34\lib\site-packages\selenium\webdriver\remote\”, line 297, in execute
File “C:\Python34\lib\site-packages\selenium\webdriver\remote\”, line 194, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: Unable to find a matching set of capabilities


python version 3.4.3 , selenium version 3.4.3 , Firefox version 49.0.


The reason for the error is the version compatibility between python, selenium, Firefox , after upgrading Firefox to the latest version 55.0 the problem is solved.

Also selenium needs geckodriver when calling Firefox, download it and add it to the Firefox installation directory, and add the Firefox installation directory to the system environment variable Path.


Test code:

1 from selenium import webdriver
3 driver = webdriver.Firefox()
4 driver.get("")

Similar Posts: