@@ -68,7 +68,6 @@ def pytest_addoption(parser):
68
68
--start-page=URL (The starting URL for the web browser when tests begin.)
69
69
--archive-logs (Archive existing log files instead of deleting them.)
70
70
--archive-downloads (Archive old downloads instead of deleting them.)
71
- --sjw (Skip JavaScript Waits such as readyState=="complete" or Angular.)
72
71
--time-limit=SECONDS (Safely fail any test that exceeds the time limit.)
73
72
--slow (Slow down the automation. Faster than using Demo Mode.)
74
73
--demo (Slow down and visually see test actions as they occur.)
@@ -1274,17 +1273,20 @@ def pytest_addoption(parser):
1274
1273
'\n (Your browser choice was: "%s")\n ' % browser_list [0 ]
1275
1274
)
1276
1275
raise Exception (message )
1276
+ undetectable = False
1277
+ if (
1278
+ "--undetected" in sys_argv
1279
+ or "--undetectable" in sys_argv
1280
+ or "--uc" in sys_argv
1281
+ or "--uc-subprocess" in sys_argv
1282
+ or "--uc_subprocess" in sys_argv
1283
+ or "--uc-sub" in sys_argv
1284
+ ):
1285
+ undetectable = True
1277
1286
if (
1278
1287
browser_changes == 1
1279
1288
and browser_text not in ["chrome" ]
1280
- and (
1281
- "--undetected" in sys_argv
1282
- or "--undetectable" in sys_argv
1283
- or "--uc" in sys_argv
1284
- or "--uc-subprocess" in sys_argv
1285
- or "--uc_subprocess" in sys_argv
1286
- or "--uc-sub" in sys_argv
1287
- )
1289
+ and undetectable
1288
1290
):
1289
1291
message = (
1290
1292
'\n \n Undetected-Chromedriver Mode ONLY supports Chrome!'
@@ -1716,7 +1718,10 @@ def pytest_runtest_teardown(item):
1716
1718
if (
1717
1719
hasattr (self , "driver" )
1718
1720
and self .driver
1719
- and "--pdb" not in sys_argv
1721
+ and (
1722
+ "--pdb" not in sys_argv
1723
+ or not python3
1724
+ )
1720
1725
):
1721
1726
if not is_windows or self .driver .service .process :
1722
1727
self .driver .quit ()
0 commit comments