18 January 2026:


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.

how to increase the default waiting time

gaveyomgaveyom Members
edited November -1 in Sahi - Open Source
Hi All/ Sahi Team,


i have observed that the default sahi waiting time is 150 seconds, if page doesn't get generated within in 150 seconds time then running script is getting stooped

some times in my application it is taking more than 150 seconds to redirected to next page

how can i increase the default waiting time when page is redirected

Comments

  • Hi gaveyom,

    You can use :

    _wait() API;

    For more details:

    http://sahi.co.in/w/_wait

    Regards
    Sumitra
  • Hi,

    There is a lot of settings about time waitings to configure in the sahi.properties file.
    Can be found under: {Sahi_home}\config\sahi.properties

    Regards,

    mng.
  • Hi nacef,

    Changing sahi.properties is not the right way.

    Its always been suggested to use explicit wait() statement if the application is taking more time to load.

    Regards
    Sumitra
  • Hi Sumitra,

    I agree. But gaveyom is talking here about "default" waiting time. I thought it would maybe help him if he didn't noticed settings present in the sahi.properties file.

    BTW, is there any news on my previous post dear? (Rhino for the controller7.js)

    :)

    Many thanks.

    mng.
  • Hi Sumitra & Nacef ,

    thanks a lot for your quick reply

    yes i want to increase the default time not by using wait method

    but as per sumitra it is not preferable to edit the properties file

    please let me know how to increase the default time in properties file if possible not by using wait method

    please do let me know is it possible
  • Bump. I would also find this very helpful.
  • look for "# Script execution params" in your Sahi_Home/config/sahi.properties and play around with the values.

    Regards
    Wormi
  • I've tried the following:
    script.max_reattempts_on_error | suite.max_inactive_time_for_script | script.stability_index | script.max_cycles_for_page_load

    5 | 60 | 30 |2400
    5 | 60 | 5 | 100
    5 | 60 | 1 | 10
    1 | 10 | 1 | 10

    There has been no change in time-out results. Do you know which parameters would affect the time-out?
  • Never mind. I got it to work. Thanks! It seems Sahi was not terminating even when I closed all browsers and tried to disable the Sahi proxy. Instead I had to terminate java.exe. It works, now, though, and if anyone is curious, the way to change your time-out period length seems to be by setting the following property:

    #Number of cycles Sahi will wait for the page to load before it proceeds with execution
    #Time spent is (script.max_cycles_for_page_load x script.time_between_steps) milliseconds
    script.max_cycles_for_page_load=5700

    By default, it is 1200. Since script.time_between_steps is 100 by default, the time spent waiting for the page to load is 1200 * 100 / 1000 = 120 seconds. Or at least, it would be, but Sahi adds thirty seconds on top of it, so whatever you set it to, don't forget that Sahi adds another 30s to it. In my case, Sahi will spend (5700 * 100 /1000) + 30 = 600 seconds before it decides to time out.
  • Yeah I always wondered why this calculation doesn't seem right.. do you have any idea where and why Sahi adds these 30sec?
  • Nope, I haven't got a clue.
Sign In or Register to comment.