On Mac Systems, Firefox and Selenium are incompatible

Source: Internet
Author: User

Workaround, check the environment:
Python 2.7.10
Firefox version 46
Selenium 2.53.6

Note: The Firefox automatic update is turned off, otherwise the selenium use case may not be executed after an automatic upgrade.

The error is as follows:

Macbookpro:github apple$ Python3 Test.pytraceback (most recent call last): File "/library/frameworks/python.framework/ versions/3.4/lib/python3.4/site-packages/selenium/webdriver/common/service.py ", line-up, in Start Stdout=self.log_ File, stderr=self.log_file) file "/library/frameworks/python.framework/versions/3.4/lib/python3.4/subprocess.py", Line 859, in __init__ restore_signals, start_new_session) File "/library/frameworks/python.framework/versions/3.4/lib /python3.4/subprocess.py ", line 1457, in _execute_child raise Child_exception_type (Errno_num, err_msg) Filenotfounderror: [Errno 2] No such file or directory: ' geckodriver ' During handling of the above exception, another EXCEP tion Occurred:traceback (most recent): File ' test.py ', line 4, <module> browser = Webdriver. Firefox () File "/library/frameworks/python.framework/versions/3.4/lib/python3.4/site-packages/selenium/webdriver /firefox/webdriver.py ", line $, in __init__ Self.service.start () FiLe "/library/frameworks/python.framework/versions/3.4/lib/python3.4/site-packages/selenium/webdriver/common/ service.py ", line Bayi, in Start Os.path.basename (Self.path), self.start_error_message) Selenium.common.exceptions.WebDriverException:Message: ' geckodriver ' executable needs to is in PATH. Exception ignored in: <bound method service.__del__ of <selenium.webdriver.firefox.service.service object at 0x1005f8198>>traceback (most recent): File "/library/frameworks/python.framework/versions/3.4/lib/ python3.4/site-packages/selenium/webdriver/common/service.py ", line 173, in __del__ self.stop () File"/Library/Framew orks/python.framework/versions/3.4/lib/python3.4/site-packages/selenium/webdriver/common/service.py ", line 145, In Stop if self.process are none:attributeerror: ' Service ' object has no attribute ' process '

?

This question is the same type of problem as the one previously summarized:
Http://www.cnblogs.com/samren/p/6001779.html

On Mac Systems, Firefox and Selenium are incompatible

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.