# \[WebUI\] Smart Wait Function

**URL:** <https://forum.katalon.com/t/webui-smart-wait-function/32816>\
**Category:** Miscellaneous\
**Tags:** new-doc-request\
**Created:** [September 10, 2019, 4:21am UTC](https://forum.katalon.com/t/webui-smart-wait-function/32816 "2019-09-10T04:21:21Z")\
**Posts on this page:** 1\
**Showing post:** 35

<div class="post-metadata">

**Author:** ![kazurayam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kazurayam/32/333_2.png) [@kazurayam](https://forum.katalon.com/u/kazurayam)\
**Post date:** [January 17, 2020, 11:03pm UTC](https://forum.katalon.com/t/webui-smart-wait-function/32816/35 "2020-01-17T23:03:06Z")

</div>

> [@kazurayam](#):
>
> Could you describe a bit of internal of the Smart Wait function?

Russ\_Thomas and Brandon\_Hein did a surgery on the SmartWait function.

> [@Katalon wait for page to be load](http://forum.katalon.com/t/katalon-wait-for-page-to-be-load/38722):
>
> I’ve seen many times that the Katalon script does not REALLY waits until the page or the element is completely loaded and ready to be clickable. Doesn’t matter if I use: WebUI.waitForAngularLoad(30) chrome error: this pages attempted to load appartitr scripts from unauthenticated sources [Capture]

> [@The World Wide Wait](http://forum.katalon.com/t/the-world-wide-wait/38779):
>
> Sorry to flood this topic, but I can’t help myself… I got curious about the SmartWait implementation: public static void doSmartWait() { WebDriver main = DriverFactory.getWebDriver(); JavascriptExecutor js = (JavascriptExecutor) main; try { js.executeAsyncScript(WAIT\_AJAX\_SCRIPT); js.executeAsyncScript(WAIT\_DOM\_SCRIPT); } catch (Exception e) { // Ignore exceptions to avoid clogging user's console log } } privat…

They found the implementation code and reviewed it.

---

_[View the full topic](https://forum.katalon.com/t/webui-smart-wait-function/32816)._
