File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change 15
15
16
16
exec_async = os .getenv ('EXEC_ASYNC' )
17
17
18
+ options = ChromeOptions ()
19
+
20
+ # Refer https://www.selenium.dev/blog/2023/headless-is-going-away/ for the new way
21
+ # to trigger browser in headless mode
22
+ options .add_argument ("--headless=new" )
23
+
18
24
if exec_async == 'true' :
19
25
# logs via pytest-xdist
20
26
# https://github.com/pytest-dev/pytest-xdist/issues/354#issuecomment-430502446
21
27
# sys.stdout = sys.stderr
22
-
23
- options = ChromeOptions ()
24
-
25
- # Refer https://www.selenium.dev/blog/2023/headless-is-going-away/ for the new way
26
- # to trigger browser in headless mode
27
- options .add_argument ("--headless=new" )
28
-
29
28
@pytest .fixture (scope = 'function' )
30
29
async def driver ():
31
30
driver = await asyncio .to_thread (webdriver .Chrome , options = options )
You can’t perform that action at this time.
0 commit comments