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

preview_player
Показать описание
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()
serv = ChromeService(ChromeDriverManager().install())
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())
driver = webdriver.Chrome(service=chrome_service)
Рекомендации по теме
Комментарии
Автор

thank you friend, i made a interaface very similar at your, but for another proposit. But, i need update your code, after version. 4.5 they change creationflags to creation_flags, and i need put the lib : from subprocess import CREATE_NO_WINDOW in my initial code

elmagico
Автор

it does not work for me, can you give me selenium and python version?

muhammadumairansari