davehunt / selenium-python-workshop

A workshop on getting started with Selenium and Python
Other
9 stars 5 forks source link

019_launching_firefox.md error #1

Open ghost opened 7 years ago

ghost commented 7 years ago

i have set the geckodriver on system path as : ‪C:\selenium_drivers\geckodriver.exe

From the command line: if i run

from selenium.webdriver import Firefox driver = Firefox()

The error i get is as follows: File "C:\Python36\lib\site-packages\selenium\webdriver\common\service.py", line 74, in start stdout=self.log_file, stderr=self.log_file) File "C:\Python36\lib\subprocess.py", line 707, in init restore_signals, start_new_session) File "C:\Python36\lib\subprocess.py", line 990, in _execute_child startupinfo) FileNotFoundError: [WinError 2] The system cannot find the file specified

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "", line 1, in File "C:\Python36\lib\site-packages\selenium\webdriver\firefox\webdriver.py", line 140, in init self.service.start() File "C:\Python36\lib\site-packages\selenium\webdriver\common\service.py", line 81, in start os.path.basename(self.path), self.start_error_message) selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH.

ghost commented 7 years ago

geckodriver