python error in Firefox with selenium:
Traceback (most recent call last):
File “G:\python_work\chapter11\test_selenium_firefox.py”, line 10, in <module>
driver = webdriver.Firefox()
File “C:\Python34\lib\site-packages\selenium\webdriver\firefox\webdriver.py”, line 154, in __init__
keep_alive=True)
File “C:\Python34\lib\site-packages\selenium\webdriver\remote\webdriver.py”, line 140, in __init__
self.start_session(desired_capabilities, browser_profile)
File “C:\Python34\lib\site-packages\selenium\webdriver\remote\webdriver.py”, line 229, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File “C:\Python34\lib\site-packages\selenium\webdriver\remote\webdriver.py”, line 297, in execute
self.error_handler.check_response(response)
File “C:\Python34\lib\site-packages\selenium\webdriver\remote\errorhandler.py”, 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 2 3 driver = webdriver.Firefox() 4 driver.get("http://www.google.com")
Similar Posts:
- Under Ubuntu system, selenium opens the Firefox browser and prompts’ unable to find a matching set of capabilities. And message: connect
- How to Solve centos7 selenium–unknown error: DevToolsActivePort file doesn’t exist
- Message: ‘geckodriver’ executable needs to be in PATH. [Solved]
- [Solved] Error in Python selenium + phantom JS alert() pop-up window
- selenium.common.exceptions.StaleElementReferenceException: Message: stale element reference: element is not attached to the page document
- Mac environment and python + selenium environment are built to solve the error reporting problem of chromedriver
- Solve the problem of import error: cannot import name webriver
- selenium.common.exceptions.WebDriverException: Message: ‘geckodriver’ executable needs to…
- [Solved] Chrome Version Error: Message: session not created: This version of ChromeDriver only supports Chrome version 95
- Error when uirecorder starts webdriver service