Trying to install pip selenium web driver and getting an error
message. Please view jpeg file to view the exact message.
New to Python and I am trying to do automate the boring stuff video tutorials.
[Image: error.jpg]
Thank you in advance
Driver Links
Download appropriate driver binary from above link. Add the downloaded executable in system path or specify executable_path in the constructor like.
driver = webdriver.Firefox(executable_path='path\to\geckodriver.exe')
browser = webdriver.Firefox(executable_path'C:\Users\Dirk\Downloads\geckodriver-v0.19.1-win64\geckodriver.exe')
What am I missing?
SyntaxError: invalid syntax
Compared to @hbknjr's code a '=' sign between executable_path and path string.
Also raw string
r
or backlash other way in path
/
.
This is because of escape character.
browser = webdriver.Firefox(executable_path=r'C:\Users\Dirk\Downloads\geckodriver-v0.19.1-win64\geckodriver.exe')
Thank you Snippsat. Looks like it opened Firefox but I still
received an error. I have attached the new image.
[Image: new_error.jpg]
Thank you in advance.