Skip to content

Commit f41bc81

Browse files
SenZmaKisymonk
andauthored
[py] Add creation flag for windows in selenium_manager (#12435)
Co-authored-by: Simon K <[email protected]>
1 parent 2580fc6 commit f41bc81

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

py/selenium/webdriver/common/selenium_manager.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,10 @@ def run(args: List[str]) -> dict:
117117
command = " ".join(args)
118118
logger.debug(f"Executing process: {command}")
119119
try:
120-
completed_proc = subprocess.run(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE, check=False)
120+
if sys.platform == "win32":
121+
completed_proc = subprocess.run(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE, creationflags=subprocess.CREATE_NO_WINDOW)
122+
else:
123+
completed_proc = subprocess.run(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
121124
stdout = completed_proc.stdout.decode("utf-8").rstrip("\n")
122125
stderr = completed_proc.stderr.decode("utf-8").rstrip("\n")
123126
output = json.loads(stdout)

0 commit comments

Comments
 (0)