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.
timer in Sahi script
hi,
Is there a way to do timing in Sahi script? I tried var timer=setTimeOut(...) but it says the method not defined.
Is there a way to do timing in Sahi script? I tried var timer=setTimeOut(...) but it says the method not defined.
Comments
Please elaborate upon your exact requirements for timing. If you want to calculate the execution time that you can get from the results log itself as every step in the result file is time stamped. You can also go through the following thread and see if this serves your purpose:
http://sahi.co.in/forums/viewtopic.php?id=625
Regards,
Pankaj Kumar
Basically I want a "classic timer". e.g set the timeout and function to execute at timeout.
Exactly what the javascript settimeout does.
Thanks,
setTimeout is a function of the window object which is not available in Sahi's javascript engine (Rhino). Could you specify how you would use a setTimeout in a test? I think you may just be able to use a _wait to time something. setTimeout basically behaves as a multi-threaded test which does not sound correct.
Regards,
Narayan
I was just trying to do the test, wait for five mins, then redo the test again. You're right I don't need multi-threaded so _wait should just work.
But may multi-threaded test be an option at some circumstances?
I'm new here, it would be nice if you can help me.
Is there a way to have tests run at specific times of the day?
how can I create a time function that for example can execute every days at specific times?
Thanks
you have to setup a cron job for continous integration using either one of this project management tools like cruise control ,jenkins,hudson etc