Skip to content

Commit 1f42b1e

Browse files
committed
Update default settings for --uc mode on Windows
1 parent ab0e051 commit 1f42b1e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

seleniumbase/undetected/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,12 +264,17 @@ def __init__(
264264
else:
265265
import subprocess
266266

267+
creationflags = 0
268+
sys_plat = sys.platform
269+
if "win32" in sys_plat or "win64" in sys_plat or "x64" in sys_plat:
270+
creationflags = subprocess.CREATE_NO_WINDOW
267271
browser = subprocess.Popen(
268272
[options.binary_location, *options.arguments],
269273
stdin=subprocess.PIPE,
270274
stdout=subprocess.PIPE,
271275
stderr=subprocess.PIPE,
272276
close_fds=IS_POSIX,
277+
creationflags=creationflags,
273278
)
274279
self.browser_pid = browser.pid
275280
service_ = None

0 commit comments

Comments
 (0)