How Can I Eliminate The "accept Cookies" Popup That Blocking The Content Of Webpage?
I already spend a week trying to figure out how to dismiss the 'accept cookies' popup that keeps freezing my code.I borrowed the code from here and transformed it a bit to meet my
Solution 1:
Instead of
WebDriverWait(driver,10).until(EC.frame_to_be_available_and_switch_to_it((
By.XPATH,'//iframe[@id="appconsent"]')))
WebDriverWait(driver,10).until(EC.element_to_be_clickable((
By.XPATH,'//button[contains(@title,"Tout Accepter")]'))).click()
Use this
WebDriverWait(driver,10).until(EC.frame_to_be_available_and_switch_to_it((
By.XPATH,"//div[@id='appconsent']//iframe")))
WebDriverWait(driver,10).until(EC.visibility_of_element_located((
By.CSS_SELECTOR,'button.button__acceptAll'))).click()
Post a Comment for "How Can I Eliminate The "accept Cookies" Popup That Blocking The Content Of Webpage?"