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.
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 thedriver
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.@LeonDoesCode Thank you for the advice. However, the system doesn't recognize it.
@AndresHaro1 The error that you are now getting is an indentation error. To fix this, remove one of the tabs befor the
wait = ...
line.@LeonDoesCode I used VS code, and it seems that is working now!
@AndresHaro1 Good to hear. Well, I hope it all works well from now on.