Ask coding questions

← Back to all posts
How can I run selenium on this platform?
h
hvaandres (6)

I have problems with my geckodriver since it is not recognizing the driver.

Comments
hotnewtop
LeonDoesCode (441)

You need to move line 7, wait = WebDriverWait(driver, 10), to inside line 9, with webdriver.Firefox() as driver:. This is because line 9 is where you define the driver variable. You are getting the error because it doesn't exist until after line 9, but you are trying to use it on line 7.

hvaandres (6)

@LeonDoesCode Thank you for the advice. However, the system doesn't recognize it.

LeonDoesCode (441)

@AndresHaro1 The error that you are now getting is an indentation error. To fix this, remove one of the tabs befor the wait = ... line.

hvaandres (6)

@LeonDoesCode I used VS code, and it seems that is working now!

LeonDoesCode (441)

@AndresHaro1 Good to hear. Well, I hope it all works well from now on.