Make Python & Selenium program executable (.exe) (How to include webdriver in .exe)
Make a program created with Python & Selenium into an …
Running Python Selenium causes the ChromeDriver console window to appear.
In this article, I will note how to hide it.
Pay attention to the version. In older versions of Selenium, the methods described in this article may not work.
(To install a specific version with pip, use pip install selenium==4.0.0b3
, for example)
The following
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from subprocess import CREATE_NO_WINDOW
service = Service('path/to/chromedriver')
service.creationflags = CREATE_NO_WINDOW
driver = webdriver.Chrome(service=service)
You can hide the console window by directly rewriting the creationflags
of the Service
class.
Written below.
Make a program created with Python & Selenium into an …
This is a method of compressing a folder into a ZIP file …
PyInstaller makes it easy to create an exe, but I …
Replace strings in Excel cells with Python. It can be used …
PyInstaller can be used to convert a program created with …
Describes how to convert an Excel sheet to PDF using Python. …