Hi @Mahendra.Shetty
Not sure if this is what you looking for:
from selenium import webdriver
from selenium.webdriver.common.by import By
driver = webdriver.Chrome()
driver.get('https://www.c...
See more...
Hi @Mahendra.Shetty
Not sure if this is what you looking for:
from selenium import webdriver
from selenium.webdriver.common.by import By
driver = webdriver.Chrome()
driver.get('https://www.cookiebot.com/en/uk-ie-cookie-compliance/')
waitTime=30
# Accept cookies
try:
cookie_button = driver.find_element(By.ID, 'CybotCookiebotDialogBodyLevelButtonLevelOptinAllowAll')
print("button located")
cookie_button.click()
except Exception as e:
print("cannot find button")
Take the given website for instance, upon loaded it prompts for cookie acceptance/acknowledgement: "Deny", "Customize" or "Allow all". In this example, I simply accept i.e., "Allow all". To do that, using browser dev tool, we can inspect the ID of that link button.
regards,
Terence