Python is using selenium to tune Firefox times wrong:
Traceback (most recent):
File "G:\python_work\chapter11\test_selenium_firefox.py", line ten, 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 +, 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 cause of the error is python, selenium, Firefox version compatibility issues, the Firefox upgrade to the latest version 55.0 after the problem solved.
At the same time selenium call Firefox need geckodriver, download and add to the Firefox installation directory, while adding the Firefox installation directory to the system environment variable path.
=============================
Test code:
1 from Import Webdriver 2 3 Driver = webdriver. Firefox ()4 driver.get ("http://www.baidu.com")
Using selenium in Python to issue Firefox errors