Header Ads

ad728
  • Breaking News

    How to keep browser open using Selenium Python



    Setting the detach parameter to true will keep the browser open after the process has ended, so long as the quit command is not sent to the driver. 

    Add a binary to options:
    ------------------------------------------------------------------------------------------------
    from selenium import webdriver

    chrome_opts = webdriver.ChromeOptions()
    chrome_opts.add_experimental_option("detach",True) #This will keep browser open
    driver = webdriver.Chrome(options=chrome_opts)


    -------------------------------------------------------------------------------------------------

    Same applicable to remaining browsers.

    No comments