hide chromeDriver console in python
Question: I'm using chrome driver in Selenium to open chrome , log into a router, press
some buttons ,upload configuration etc. all code is written in Python.

here is the part of the code to obtain the driver:

    
    
    chrome_options = webdriver.ChromeOptions()
    prefs = {"download.default_directory":  self.user_local}
    chrome_options.add_experimental_option("prefs", prefs)
    chrome_options.experimental_options.
    driver = webdriver.Chrome("chromedriver.exe", chrome_options=chrome_options)
    driver.set_window_position(0, 0)
    driver.set_window_size(0, 0)
    
    return driver
    

when i fire up my app, i get a chromedriver.exe console (a black window)
followed by a chrome window opened and all my requests are done.

**My question** : is there a way in python to hide the console window ?

(as you can see i'm also re-sizing the chrome window ,my preference would be
doing things in a way the user wont notice anything happening on screen)

thanks Sivan


Answer: While launching chrome browser not seeing chromedriver console with the given
sample code.

    
    
    from selenium import webdriver
    from selenium.webdriver.chrome.options import Options 
    from time import sleep
    options = webdriver.ChromeOptions()
    prefs = {"download.default_directory":  r"C:\New_Download"}
    options.add_experimental_option("prefs", prefs)
    print(options.experimental_options)
    
    chromeDriverPath = r'C:\drivers\chromedriver.exe'
    driver = webdriver.Chrome(chromeDriverPath,chrome_options=options)
    driver.get("http://google.com")
    driver.set_window_position(0, 0)
    driver.set_window_size(0, 0)
    

