How to disable popup?

43 views
Skip to first unread message

추어른이 되지 못한 아이

unread,
Mar 23, 2023, 8:19:18 PM3/23/23
to ChromeDriver Users
Hi, I am using selenium 4.8.2 with python.

I want to block popup window. but, all the ways i found on google didn't work...

Can you guess what the problem is?

below is my code...

def chrome_driver_dev():
options = webdriver.ChromeOptions()
# options.add_argument('--headless')
# options.add_argument('--no-sandbox')
# options.add_argument("--start-maximized")
# options.add_argument('--disable-dev-shm-usage')
options.add_argument("--disable-popup-blocking")
options.add_argument("--disable-notifications")

service = Service('chromedriver')

capabilities = webdriver.DesiredCapabilities.CHROME
capabilities["chromeOptions"] = {}
capabilities["chromeOptions"]["excludeSwitches"] = ["disable-popup-blocking"]

return webdriver.Chrome(service=service, desired_capabilities=capabilities, options=options)

추거누

unread,
Mar 23, 2023, 8:33:29 PM3/23/23
to ChromeDriver Users
plus, chrome driver version is  "ChromeDriver 110.0.5481.77"

2023년 3월 24일 금요일 오전 9시 19분 18초 UTC+9에 추거누님이 작성:
Reply all
Reply to author
Forward
0 new messages