Skip to content

Commit faa714b

Browse files
committed
Refactor an import location
1 parent bbabd09 commit faa714b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

seleniumbase/fixtures/js_utils.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
from seleniumbase import config as sb_config
1111
from seleniumbase.config import settings
1212
from seleniumbase.fixtures import constants
13-
from seleniumbase.fixtures import shared_utils
1413

1514

1615
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):
2423
because readyState == "interactive" may be good enough.
2524
(Previously, tests would fail immediately if exceeding the timeout.)
2625
"""
26+
if sb_config.time_limit and not sb_config.recorder_mode:
27+
from seleniumbase.fixtures import shared_utils
28+
2729
start_ms = time.time() * 1000.0
2830
stop_ms = start_ms + (timeout * 1000.0)
2931
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()
3134
try:
3235
ready_state = driver.execute_script("return document.readyState")
3336
except WebDriverException:

0 commit comments

Comments
 (0)