open selenium

    0

    1

    Stefan Marx

    The code first creates a ChromeOptions object, which contains the following two options:

    { "add_experimental_option": "excludeSwitches", "useAutomationExtension": false }

    Then, it creates a driver object, specifying the options object as the ChromeOptions object's parameter.

    The driver object will use the options specified in the options object to control the behavior of the Chrome browser.

    from selenium import webdriver
    from selenium.webdriver.chrome.options import Options
    from selenium.webdriver.common.by import By
    
    options = webdriver.ChromeOptions()
    options.add_experimental_option("excludeSwitches", ["enable-automation"])
    options.add_experimental_option('useAutomationExtension', False)
    
    driver = webdriver.Chrome(options=options)
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Playground
    • Snippets
    • Cookbooks
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.