Using selenium in Python to issue Firefox errors

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.