File tree 1 file changed +8
-0
lines changed
1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 16
16
import io
17
17
import json
18
18
import os
19
+ import subprocess
19
20
import sys
20
21
from abc import ABC , abstractmethod
21
22
from pathlib import Path
@@ -113,6 +114,12 @@ async def connect(self) -> None:
113
114
if getattr (sys , "frozen" , False ):
114
115
env .setdefault ("PLAYWRIGHT_BROWSERS_PATH" , "0" )
115
116
117
+ startupinfo = None
118
+ if sys .platform == "win32" :
119
+ startupinfo = subprocess .STARTUPINFO ()
120
+ startupinfo .dwFlags |= subprocess .STARTF_USESHOWWINDOW
121
+ startupinfo .wShowWindow = subprocess .SW_HIDE
122
+
116
123
self ._proc = await asyncio .create_subprocess_exec (
117
124
str (self ._driver_executable ),
118
125
"run-driver" ,
@@ -121,6 +128,7 @@ async def connect(self) -> None:
121
128
stderr = _get_stderr_fileno (),
122
129
limit = 32768 ,
123
130
env = env ,
131
+ startupinfo = startupinfo ,
124
132
)
125
133
except Exception as exc :
126
134
self .on_error_future .set_exception (exc )
You can’t perform that action at this time.
0 commit comments