Skip to content

Commit

Permalink
[py] Add creation flag for windows in selenium_manager (#12435)
Browse files Browse the repository at this point in the history
Co-authored-by: Simon K <jackofspaces@gmail.com>
  • Loading branch information
SenZmaKi and symonk committed Jul 29, 2023
1 parent 2580fc6 commit f41bc81
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion py/selenium/webdriver/common/selenium_manager.py
Expand Up @@ -117,7 +117,10 @@ def run(args: List[str]) -> dict:
command = " ".join(args)
logger.debug(f"Executing process: {command}")
try:
completed_proc = subprocess.run(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE, check=False)
if sys.platform == "win32":
completed_proc = subprocess.run(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE, creationflags=subprocess.CREATE_NO_WINDOW)
else:
completed_proc = subprocess.run(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
stdout = completed_proc.stdout.decode("utf-8").rstrip("\n")
stderr = completed_proc.stderr.decode("utf-8").rstrip("\n")
output = json.loads(stdout)
Expand Down

0 comments on commit f41bc81

Please sign in to comment.