Problems with Wait commands on Katalon 5.8.6

I’m performing Web testing on Chrome Version 70.0.3538.102 (Official Build) (64-bit)

In my test case I want to click on the “Next page” button and then verify the page number to see the button is working.

I’m waiting for the Web Site’s page load with this command:
WebUI.waitForPageLoad(30)

and then for element clickable with this one:
WebUI.waitForElementClickable(findTestObject(‘Query Video Pane Test/Query Video Navigation/div_NEXT’), 30)

During the execution of the test, I can see it’s not waiting and clicking on the “Next” button before the page has finished uploading and obviously cause my test to fail.

Please let me know if you need more information to help me with this problem.

Thanks,
Ayana.

Wait time will depend on your website. Post the link and your script, if possible.

Do you have any jQuery on the page? Try adding WebUI.waitForJQueryLoad(), or a simple WebUI.delay(), before wait for clickable.

===

Hi Mate, thanks for your response!
I don’t have any jQuery but the WebUI.delay() solves the problem.
Can you please explain why the wait time depends on my website?
I would like to further investigate this problem because WebUI.waitForElementClickable is preferable in some cases.

Thanks,
Ayana