How to get and click "dismiss-button" inside Google vignette? I've already tried the standard solution from other posts but I get "NoSuchElementException" The last digit in "aswift_" iframe is variable so I'm using a partial name match like this:
WebDriverWait(self.driver, 5).until(EC.frame_to_be_available_and_switch_to_it((By.XPATH, "//*[contains(@name, 'aswift_')]")))
# doesn't work:
self.driver.find_element(By.ID, 'dismiss-button').click()
or:
# doesn't work:
self.driver.find_element(By.XPATH, "//*[contains(@id, 'dismiss-button')]".click()
To get that vignette you have to:
- Enter https://www.automationexercise.com/
- Click "Products"
Thanks for your support!