The element to dismiss the message is within an <iframe> so you have to: Induce WebDriverWait for the desired frame to be available and switch to it. Induce WebDriverWait for the desired element to be clickable. You can use either of the following Locator Strategies: Using CSS_SELECTOR: driver.get('') WebDriverWait(driver, 20).until(EC.frame_to_be_available_and_switch_to_it((By.CSS_SELECTOR,"iframe[src^='']"))) WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.CSS_SELECTOR, "img.rax-image[src^='']"))).click() Using XPATH: driver.get('') WebDriverWait(driver, 20).until(EC.frame_to_be_available_and_switch_to_it((By.XPATH,"//iframe[starts-with(@src, '')]"))) WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.XPATH, "//img[@class='rax-image ' and starts-with(@src, '')]"))).click() Note : You have to add the following imports : from import WebDriverWait from import By from import expected_conditions as EC Browser Snapshot: