isPageLoaded
Boolean isPageLoaded(browserTab)
Boolean isPageLoaded()
This function returns true
if the page in the tab referenced by browserTab
has been completely loaded; otherwise it returns false
. A complete and successful load implies that all of the page's objects can potentially be accessed. This function can be used with the Boolean waitFor(condition) function to wait for a page to be loaded before accessing it from a test script.
Since page loading, HTTP requests, and so on, are asynchronous, even after a call to the isPageLoaded
function returns true
it is essential that the Object waitForObject(objectOrName) function (or another wait function) is used to ensure that the specific objects of interest are ready to be accessed. Also, it may be necessary to pass a longer timeout to the Object waitForObject(objectOrName) function than the default 20 000 milliseconds. (See also How to Synchronize Web Page Loading for Testing.)
Note: If the browserTab
is not specified, the call will always use the initially loaded tab even if another tab is currently active. This can lead to unexpected behavior if the test works with multiple browser tabs or windows, so we suggest to always specify the browserTab
parameter in new scripts.
© 2024 The Qt Company Ltd.
Documentation contributions included herein are the copyrights of
their respective owners.
The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.
Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property
of their respective owners.