File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 10
10
from seleniumbase import config as sb_config
11
11
from seleniumbase .config import settings
12
12
from seleniumbase .fixtures import constants
13
- from seleniumbase .fixtures import shared_utils
14
13
15
14
16
15
def wait_for_ready_state_complete (driver , timeout = settings .LARGE_TIMEOUT ):
@@ -24,10 +23,14 @@ def wait_for_ready_state_complete(driver, timeout=settings.LARGE_TIMEOUT):
24
23
because readyState == "interactive" may be good enough.
25
24
(Previously, tests would fail immediately if exceeding the timeout.)
26
25
"""
26
+ if sb_config .time_limit and not sb_config .recorder_mode :
27
+ from seleniumbase .fixtures import shared_utils
28
+
27
29
start_ms = time .time () * 1000.0
28
30
stop_ms = start_ms + (timeout * 1000.0 )
29
31
for x in range (int (timeout * 10 )):
30
- shared_utils .check_if_time_limit_exceeded ()
32
+ if sb_config .time_limit and not sb_config .recorder_mode :
33
+ shared_utils .check_if_time_limit_exceeded ()
31
34
try :
32
35
ready_state = driver .execute_script ("return document.readyState" )
33
36
except WebDriverException :
You can’t perform that action at this time.
0 commit comments