How can I use timeout less the 1 second in builtinKeywords

Hi, I just wanted to use timeout less than 1 second in builtinKeyword how can I achieve that
for eg: Mobile.verifyElementVisible(testobject, 0.1, failureHandling)
Currently only minimum timeout I can give is 1 second so if anyone know how to achieve please let me know

Thanks,

No, you can not. As clearly documented, the minum timeout value of Katalon’s built-in keywords is 1 second.

I do not see why you want to use timeout faster than 1 second. In my opinion, it is not a good idea to expect your web application to work with preciseness of milli-seconds.

Just a note that the timeout is not the amount of time that the statement will take, but the time the system will wait for the element to become visible before giving you an error. If the statement finds your object right away (like in 0.1 seconds), it will return true and move on to the next statement. Realize that computers do other things, like check if you have email, beside running your code all the time. I like 10, but you can set it for 3.

System will wait at most timeout (seconds) to return a result

2 Likes

ok I got it thanks I required for some condition so is there any other method I can use similar to mobile.verifyelementvisible with full control of timeout @grylion54 and @kazurayam

It would be possible for you to create a custom keyword which works almost the same as Mobile.verifyElementVisible but accepts the timeout in milli-second order.

You can read the full Groovy source code of the Mobile.verifyElementVisible at

At the LINE#72, you see

            WebElement element = findElement(to, timeout * 1000)

This line is the very reason why the timeout value is treated as seconds-basis, not milli-seconds-basis.

You can create your custom keyword with new package name and class name. You want to copy the source the Mobil.verifyElementVisible into it. Then change the LINE#72 to

            WebElement element = findElement(to, timeout)

Then your custom keyword would work on milli-seconds basis.

Thank you very much @kazurayam will check this and let you know the results