File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 1414from seleniumbase .fixtures import shared_utils
1515
1616
17- def wait_for_ready_state_complete (driver , timeout = settings .EXTREME_TIMEOUT ):
17+ def wait_for_ready_state_complete (driver , timeout = settings .LARGE_TIMEOUT ):
1818 """
1919 The DOM (Document Object Model) has a property called "readyState".
2020 When the value of this becomes "complete", page resources are considered
21- fully loaded (although AJAX and other loads might still be happening).
21+ fully loaded (although AJAX and other loads might still be happening).
2222 This method will wait until document.readyState == "complete".
23+ This may be redundant, as methods already wait for page elements to load.
24+ If the timeout is exceeded, the test will still continue
25+ because readyState == "interactive" may be good enough.
26+ (Previously, tests would fail immediately if exceeding the timeout.)
2327 """
2428 start_ms = time .time () * 1000.0
2529 stop_ms = start_ms + (timeout * 1000.0 )
@@ -39,8 +43,7 @@ def wait_for_ready_state_complete(driver, timeout=settings.EXTREME_TIMEOUT):
3943 if now_ms >= stop_ms :
4044 break
4145 time .sleep (0.1 )
42- raise Exception (
43- "Page elements never fully loaded after %s seconds!" % timeout )
46+ return False # readyState stayed "interactive" (Not "complete")
4447
4548
4649def execute_async_script (driver , script , timeout = settings .EXTREME_TIMEOUT ):
You can’t perform that action at this time.
0 commit comments