Sometimes TestObject is not found, but visible on error screenshot

@Russ_Thomas: Thank you for your quick reply.

I figured out some new information: It seems that WebUI.waitForPageLoad(10) does not work in my case (I know, I am not the only one with this problem). Watching my firefox and katalon test execution in parallel, I see the following:

  • firefox needs 16 seconds to load the webpage (long database query and big html table)
  • in those 16 seconds, I see katalon executing the loop (mentioned above) 4 times

So WebUI.waitForPageLoad(10) does not pause the test until the page is loaded in firefox. Instead katalon test execution goes on.
I guess, the page is completly loaded at some random time in test execution. In this case, it can easily happen that the button is still there when test execution is at WebUI.verifyElementPresent(myButtonTestObject .... Then the new page (without the button) is completly loaded. And so the following WebUI.click(myButtonTestObject) fails, since the button is gone.


Any ideas how to solve this?

My next plan would be to add a timestamp (milliseconds) in EVERY html page renderd by our AUT. So I could wait until the current page in firefox has a new timestamped, compared to the old page. :wink: