I am currently working on a bot that logs into instagram, I currently have the script to log in and turn on notifications but when then I get a window pop the code does not click on allow. I have been stuck for quite some time. Thank you in advance for your help.
def allow_noti():
allow_noti = WebDriverWait(browser, 20).until(EC.element_to_be_clickable((By.XPATH,
"//button[contains(.,'Turn On')]")))
allow_noti.click()
allow_browser = WebDriverWait(browser, 10).until(EC.element_to_be_clickable((By.XPATH, '//*
[text()="Allow"]'))).click()
allow_browser.click()