I dont believe you can use selenium without using the driver. What popup window are you referring to? A popup can be dismissed via selenium.
driver.switch_to
can handle switching windows such as popups or tabs. In which you would switch to it and close it, then return to the parent window. You can also try to dismiss notifications before via something similar to this depending on what popup you are talking aboutdef chrome_prep(self): '''get rid of asking to save password and notifications popup''' chrome_options = webdriver.ChromeOptions() chrome_options.add_experimental_option( 'prefs', { 'credentials_enable_service': False, "profile.default_content_setting_values.notifications" : 2, 'profile': { 'password_manager_enabled': False } } ) return chrome_options def setup_chrome(self): options = self.chrome_prep() self.browser = webdriver.Chrome(CHROMEPATH, chrome_options=options)You can open a new tab via javascript
driver.execute_script("window.open('');")
and then switch to it and open a url. Such as:#driver.get("https://malaysia.yahoo.com/?p=us") driver.execute_script("window.open('');") driver.switch_to.window(driver.window_handles[1]) driver.get('https://python-forum.io') driver.switch_to.window(driver.window_handles[0]) driver.get('https://malaysia.yahoo.com/?p=us')You can build an exe using Pyinstaller
Recommended Tutorials: