[WebUI] Wait For Page Load


This is a companion discussion topic for the original entry at https://docs.katalon.com/katalon-studio/docs/webui-wait-for-page-load.html

I want to know what is the meaning of “Page Load” for that keyword.

  1. HTML document is loaded and the DOM is ready, even if all the graphics haven’t loaded yet.
  2. The complete page is fully loaded, including all frames, objects and images.

which one is the best explanation for “Page Load”? or neither both option are incorrect?

I believe it would be the second one. In the cases I have ran, I get much better success with page load then I do with a delay/verify element present. Best bet is to try it out and see what works for you

I’ve noticed that waitForPageLoad does not fully wait for a page to load. In my AUT, I’d click a button which redirects me to another page and then execute this keyword. However, its time elapsed I’ve seen range from 0.010 to 0.05 seconds, which seems way too short of a wait. It has lead to false errors in my scripts when I try to verify the new page’s window title, but the actual window title I extract is actually from the previous page.

I can confirm this. Same problem here.
See: Sometimes TestObject is not found, but visible on error screenshot

Solution (in my case):

Wait for a set of things unique to the page that should be present and visible.

From: waitForPageLoad not really waiting for the page to finish loading