Hi Guys,
I'm using Selenium to interact with a few websites, on a few i get this alert:
![[Image: TrgBkML.png]](https://i.imgur.com/TrgBkML.png)
is there a way i can disable all alerts? i have managaed to disable notifications, my code for initializing the driver is below.
best regards
Graham
I'm using Selenium to interact with a few websites, on a few i get this alert:
![[Image: TrgBkML.png]](https://i.imgur.com/TrgBkML.png)
is there a way i can disable all alerts? i have managaed to disable notifications, my code for initializing the driver is below.
# init driver ... def init_driver(using_linux, proxy): options = Options() options.headless = False options.add_argument('start-maximized') options.add_argument('--disable-notifications') options.add_argument('--disable-extensions') options.add_argument('--log-level=3') options.add_argument('--ignore-certificate-errors') options.add_argument('--ignore-ssl-errors') options.add_experimental_option("excludeSwitches" , ["enable-automation","load-extension"]) prefs = {'profile.default_content_setting_values.notifications' : 2} options.add_experimental_option('prefs', prefs) if proxy == "0.0.0.0:0": print("--> PROXY DISABLED ...") else: print("--> USING PROXY: " + str(proxy) + " ...") options.add_argument('--proxy-server=%s' % proxy) if using_linux: return webdriver.Chrome("/usr/bin/chromedriver", chrome_options=options) else: return webdriver.Chrome("chromedriver.exe", chrome_options=options)Any help would be appreciated, the script eventually stalls /breaks because of it.
best regards
Graham