Aug-31-2018, 05:00 PM
so i was trying out a simple code like this:
from selenium import webdriver browser = webdriver.Firefox()and it returned me a huge error message:
Error:Traceback (most recent call last):
File "C:\Users\MSI\AppData\Local\Programs\Python\Python37-32\lib\site-packages\selenium\webdriver\common\service.py", line 76, in start
stdin=PIPE)
File "C:\Users\MSI\AppData\Local\Programs\Python\Python37-32\lib\subprocess.py", line 756, in __init__
restore_signals, start_new_session)
File "C:\Users\MSI\AppData\Local\Programs\Python\Python37-32\lib\subprocess.py", line 1155, 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 "C:\Users\MSI\AppData\Local\Programs\Python\Python37-32\Automate the Boring Stuff with Python Course\seleniumwebdriver.py", line 2, in <module>
browser = webdriver.Firefox()
File "C:\Users\MSI\AppData\Local\Programs\Python\Python37-32\lib\site-packages\selenium\webdriver\firefox\webdriver.py", line 157, in __init__
self.service.start()
File "C:\Users\MSI\AppData\Local\Programs\Python\Python37-32\lib\site-packages\selenium\webdriver\common\service.py", line 83, in start
os.path.basename(self.path), self.start_error_message)
selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH.
so what does this say? and what do i have to do to fix it?