1
I recently decided to do an automation using Python with the Selenium module. Everything was going well until I had to simulate a click on a button that is not on the screen at the moment and the time it appears varies with waiting time in the queue, I wanted to know how to make the webdriver wait for the button to appear so I could simulate the click... If anyone can help me, I’d be very grateful!
NOTE: I have tried this code: confirm = wait.until(EC.element_to_be_clickable((By.ID, "confirm"))) confirm.click()
, but it didn’t work, always gives this error:
Traceback (Most recent call last): File "/home/lordvitor11/Desktop/Python/test.py", line 30, in confirm = Wait.until(EC.element_to_be_clickable((By.ID, "confirm")) File "/usr/local/lib/python3.8/dist-Packages/Selenium/webdriver/support/Wait.py", line 80, in until raise Timeoutexception(message, screen, stacktrace) Selenium.common.exceptions.Timeoutexception: Message:
I used the code indicated and.... IT WORKED!! At first it was not working I read the error message and I realized that the time I put to wait was not being enough, so I increased the time and it worked!! Thank you very much!!! xD
– lordvitor11