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.

Max value for _wait ?

jmarcjmarc Members
edited November -1 in Sahi - Open Source
Hi,

Is there a specific max value for the api _wait (the max time in milliseconds after which execution will resume) ?
Because within a script, I'm using values (such as 180000 = 3 minutes) for which the script doesn't run at all. When I replace these values with smaller ones, the script run without issue...

Can someone help me on this, please ?

Regards,

Jean-Marc

Comments

  • Hi jmarc,

    There is no max time for _wait() API. You can say Sahi to wait for any time by giving the time in milliseconds after which the next step in the script is executed.

    Sahi will wait for the specified time in the _wait() API.

    In your case, the script should have ran the next step after waiting for 3 minutes

    Could you please be more specific when you say : " I'm using values (such as 180000 = 3 minutes) for which the script doesn't run at all."

    Are you getting any error or the scripts are not been executed after you give _wait(180000)?

    Regards
    Sumitra
  • Hi Sumitra,

    I give you more precision on " I'm using values (such as 180000 = 3 minutes) for which the script doesn't run at all."
    In my case, the script doesn't start at all : When the script begins, the browser (Firefox) appears during a short time, and closes itself, and the script terminates. The logs are such as :
    <<
    Starting script
    ERROR
    Script: C:\Users\Administrateur\sahi\userdata\scripts\Kiamo_Scripts\12_Tests\ChgtEtatsAppelEntrant_svr.sah does not exist. at 16 déc. 2011 17:47:05
    >>

    When I replace the parameter for _wait with smaller one, the script starts and go on.

    I will test today again with values such as 3 minutes.

    Regards,

    Jean-Marc
  • Hi Sumitra,

    On another topic about the _wait() API, I have noticed that the real _wait time is greater than the one in parameter.
    Look at the logs below (there is no instruction between each _wait call) :
    _wait(1000); at 16 déc. 2011 21:14:01
    _wait(30000); at 16 déc. 2011 21:14:34
    _wait(45000); at 16 déc. 2011 21:15:23
    _wait(60000); at 16 déc. 2011 21:16:28
    _wait(75000); at 16 déc. 2011 21:17:50
    _wait(90000); at 16 déc. 2011 21:19:29
    _wait(105000); at 16 déc. 2011 21:21:23

    the _wait(30000) really waits for 33 seconds
    the _wait(45000) really waits for 49 seconds
    the _wait(60000) really waits for 65 seconds
    the _wait(75000) really waits for 82 seconds
    the _wait(90000) really waits for 99 seconds
    the _wait(105000) really waits for 114 seconds

    The real wait time is 10% greater than the one in parameter.

    Do you have noticed this behavior of the _wait() API ?

    Regards,

    Jean-Marc
  • Hi jmarc,

    Can you post the script here?

    Also, post the url if it is accessible outside.

    It works fine for me with _wait(18000) and with out using _wait ();

    Regards
    Sumitra
Sign In or Register to comment.