18 January 2026:
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
What is the maximum value for “_wait(xx);” statement?
Hello,
What is the maximum value for “_wait(xx);” statement?
I have noticed that it is 2 minutes only (120000 miliseconds).
I need to test “timeout” period for a web application, where in it is set to 20 minutes. If I use 19 minutes as wait period in “_wait(xx);” statement, the script fails.
Any suggestions?
Thanks and Regards,
Santosh T
What is the maximum value for “_wait(xx);” statement?
I have noticed that it is 2 minutes only (120000 miliseconds).
I need to test “timeout” period for a web application, where in it is set to 20 minutes. If I use 19 minutes as wait period in “_wait(xx);” statement, the script fails.
Any suggestions?
Thanks and Regards,
Santosh T
Comments
Does that mean 130 seconds is maximum value for wait() statement?
I had a similar issue. I think it's related to the config property: script.max_cycles_for_page_load
The best solution is probably to use something similar to below:
//Will wait for <delayTime> minutes
function waitX(delayTime)
{
for (count = 0; count < delayTime; count++)
{
_wait(60000);
}
}
That way you only wait for a minute at a time before running the next wait command, and thus Sahi doesn't timeout.
_wait() function is pointed to a setTimeOut() function in javascript through a Rhino engine. So _wait() works in similar way as setTimeOut().
Message "Rhino lib:### Step did not return in 130 seconds" on the console means that if there is error while executing your sahi script, proxy waits till 130 seconds until it gets the response from the Rhino. So if it does not get the step executed within 130 seconds then the message is printed in the console as well as in the logs and it will be marked as an Error.
Thanks,
Venky.
The solution you have suggested worked fine. That was really good idea
Dear Venky,
Where can I find details of such Sahi functions like, setTimeOut(), _setValue(){}; and many more?
Thanks and Regards,
Santosh Takekar
Les's answer is the best work around for now. This is a bug which will be fixed in the next build. Do not get into setTimeout.
Regards,
Narayan