I am using selenium to switch windows but I am trying to close these 2 as they pop up when it is in automation mode and it screws up the window_handles. Is there a way to stop them from showing up other than using headless mode. I have tried using all these commands but the notifications/pop up are still showing. self.edge_options = webdriver.EdgeOptions() self.prefs = { 'download.default_directory': str(self.temp_path), "download.prompt_for_download": False, # Disable download prompt "download.directory_upgrade": True } self.edge_options.add_experimental_option('prefs', self.prefs) self.edge_options.add_argument("--disable-notifications") self.edge_options.add_argument("--no-download-notification") Continue reading...