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)?
from time import sleep
while EC.alert_is_present()(driver):
sleep(30)
If you simply want to alert the user then use pymsgbox or Telegram API to send him a message,
from pymsgbox import alert
alert("Hey User")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With