Add FreeBSD support (#1054)

This commit is contained in:
Raphaël
2024-02-28 03:45:04 +01:00
committed by GitHub
parent 0bc7a4498c
commit afdc1c7a8e
4 changed files with 78 additions and 27 deletions

View File

@@ -451,8 +451,10 @@ class Chrome(selenium.webdriver.chrome.webdriver.WebDriver):
options.binary_location, *options.arguments
)
else:
startupinfo = subprocess.STARTUPINFO()
startupinfo = None
if os.name == 'nt' and windows_headless:
# STARTUPINFO() is Windows only
startupinfo = subprocess.STARTUPINFO()
startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
browser = subprocess.Popen(
[options.binary_location, *options.arguments],