Check if any alert exists using selenium with python

What I do is to set a conditional delay with WebDriverWait just before the point I expect to see the alert, then switch to it, like this: from selenium import webdriver from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.common.exceptions import TimeoutException browser = webdriver.Firefox() browser.get(“url”) browser.find_element_by_id(“add_button”).click() try: WebDriverWait(browser, 3).until(EC.alert_is_present(), ‘Timed out … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)