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.

Batch Execution of scripts getting fail

AmolAmol Members
edited November -1 in Sahi - Open Source
Hi,
we are facing two issue while executig batch run .

1) we have created sahi script which are running fine when executed individually.

But when we create .suite file and run those scripts in batch, it fails.

we have increased the time interval between the steps and number of reattempts when error is received in sahi properties file.



2) If a script is failed in between then rest all scripts are getting failed which are placed after the failed script.

Our created every script starts at login page, but if any script is failed inside the web page, All scripts are failed sequentially as it searches for username & password textboxes on login page.

Can you please let us know how to handle this kind of issue or click on logout when exception occcurs.

Comments

  • Amol wrote:
    1) we have created sahi script which are running fine when executed individually.
    But when we create .suite file and run those scripts in batch, it fails.
    What is the error you get? I faced a similar problem to find out that I was using a dom object property which was not getting set correctly while I run the suite. There can be multiple different reasons, if you post the exact error may be it would help.
    Amol wrote:
    2) If a script is failed in between then rest all scripts are getting failed which are placed after the failed script.
    I would suggest use assertions and use exception handling so that he script doesn't fail.
  • Hi Amo
    Amol wrote:
    Hi,
    Can you please let us know how to handle this kind of issue or click on logout when exception occcurs.

    see http://sahi.co.in/w/exception-handling

    Alternatively start every script with
    $LOGOUT=_link("Logout);
    if(_condiotion(_exists($LOGOUT)){
      _click($LOGOUT);
    }
    

    You may take a look at http://sahi.co.in/w/sahi-call-back-functions

    Regards
    Wormi
Sign In or Register to comment.