Quantcast
Channel: Active questions tagged selenium - Stack Overflow
Viewing all articles
Browse latest Browse all 98787

Handling window pop up with selenium [duplicate]

$
0
0

This question already has an answer here:

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. Window Popup

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()

Viewing all articles
Browse latest Browse all 98787

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>