Waiting Time Global Declaration

Our internet speed is at times too slow and too fast, Is there any Waiting Time that can be declared Globally for whole Project like process only when the Element is Visible.

how about GlobalVariable

WebUI.waitForElementVisible(findTestObject('IRAMP-CC/CC UI/CalcContainers/button_standard'), GlobalVariable.waitFor)

also thre is this settings in project:

Global variables are a good idea (you could set global variables for short, medium or long waits for example - rather than trying to guess a number per script).
Eg longWait = 60, shortWait = 5…

In the script, refer to global variable for your Delay, rather than inputting a number.

Or how about https://docs.katalon.com/katalon-studio/docs/webui-smartwait.html

1 Like

right now i’m thinking you can just setup longest possible time, since for quick connection you will not wait full time same way as for slow connection. means if you will setup waitForXYZ() to 60 seconds and on slow it works fine, it will work also on quick … will not wait full 60 seconds unless something is really broken in application…

Is that possible to declare globally? whats the code Is this ? WebUI.waitForElementPresent(findTestObject(‘Page_KataloLogin/div_LoginMessage’), GlobalVariable.G_Timeout_Small)

what do you mean globally? test case? test suite? project? Katalon Studio?

don’t understand what are you asking …

Globally for whole Project, our website is too slow or too fast at times, so am using WebUI.waitForElementPresent(findTestObject(‘Page_KataloLogin/div_LoginMessage’), GlobalVariable.G_Timeout_Small) in every Testcase for each line, like I give WebUI.Delay(70) until the page loads it waits even after the page loads ,then Wait until the webtable loads, then wait until the button visible and then clicks
So instead writing for each line its better to declare for whole project whole 100 testcases,
I set enable the Wait for as you said earlier from settings but it doesn’t work.

WebUI.waitForElementPresent - will be trigered if element exists in DOM - if you rely on element to be visible/clickable you need to use other methods …
what i do is i’ll put WebUI.waitForElementVisible for last rendered element on page and just after that i’m running other steps…