How to hide Chromedriver console window when running exe or GUI in Python selenium

Аватар автора
PHP Сниппеты
How to hide Chromedriver console window when running .exe or in GUI in Python selenium. If you are running headless mode replace your driver with these lines of code op = webdriver.ChromeOptions() op.add_argument("--window-size=1920,1080") op.add_argument("--start-maximized") op.headless = True serv = ChromeService(ChromeDriverManager().install()) serv.creationflags = CREATE_NO_WINDOW driver = webdriver.Chrome(service=serv, options=op) If not in headless mode, replace your driver with these lines of code chrome_service = ChromeService(ChromeDriverManager().install()) chrome_service.creationflags = CREATE_NO_WINDOW driver = webdriver.Chrome(service=chrome_service)

0/0


0/0

0/0

0/0