What happens exactly in 31004 errors?

I'm a bit puzzled with the "*31004 Wait for Page Complete Timeout" errors. Although the default timeout value is 30s or 60s - which is probably a very good wait time for most of pages - I still got "Page Complete" timeouts.

Scatter charts are particularly useful. There is also no indication which object or call the page was waiting to finish.

Would someone share practical experiences? What would block a page to complete? How one can know, exactly, which object is blocking the page to complete? And, under the hood, what is a 31004: would it be a DOM.Ready event?

1 Reply

Sometimes a page will never fire the onload event, and since the "page complete" action depends on that event, it just keeps waiting, and eventually times out. A 31004 is the code for when that happens.

When that happens to me I change the wait to either a wait for Validate (which completes when a certain element has a certain value) or Wait for Event - Dom Ready. This allows the script to move on to the next action when the Dom Ready event fires on the page.

If you have difficulty getting the waits tuned the way you want them, the support team is really good at working through these kinds of issues, I would recommend submitting a support ticket.