2

I need from my Python script to just be able to Block this permission request.

Popup window

This is my code:

from selenium import webdriver
import time

bot = webdriver.Chrome()
time.sleep(2)
bot.get("https://MYWEBSITE")

I tried bot.switch_to.alert, but it crashed with:

selenium.common.exceptions.NoAlertPresentException: Message: no such alert

I found solutions using tabs and enter, but here this does not work. This thread wasn't functional either. Any suggestions? Thanks.

Kralik_011
  • 373
  • 2
  • 12

0 Answers0