I have created a dialog box in browser (this Happens when an error occurs in user input details). What I need is to wait until the user clicks on the dialog box before preceding with automatic execution (only for testing). Here is what I have
# driver is a chrome web driver
driver.execute_script("alert('qwer');")
wait = WebDriverWait(driver, 10)
element = wait.until(EC.alert_is_present())
I tried to search online but only got an answer when a user clicks on a button inside a webpage but not on a generated dialog box. How to do it (if possible)?
timemodule. I forgot which function you have to call, but there is one that waits for an action, and then executes the following code.