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 14
14
from seleniumbase .fixtures import shared_utils
15
15
16
16
17
- def wait_for_ready_state_complete (driver , timeout = settings .EXTREME_TIMEOUT ):
17
+ def wait_for_ready_state_complete (driver , timeout = settings .LARGE_TIMEOUT ):
18
18
"""
19
19
The DOM (Document Object Model) has a property called "readyState".
20
20
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).
22
22
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.)
23
27
"""
24
28
start_ms = time .time () * 1000.0
25
29
stop_ms = start_ms + (timeout * 1000.0 )
@@ -39,8 +43,7 @@ def wait_for_ready_state_complete(driver, timeout=settings.EXTREME_TIMEOUT):
39
43
if now_ms >= stop_ms :
40
44
break
41
45
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")
44
47
45
48
46
49
def execute_async_script (driver , script , timeout = settings .EXTREME_TIMEOUT ):
You can’t perform that action at this time.
0 commit comments