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.

Run a batch file using sahi script

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

I want to execute a batch file during execution of my sahi script.

Detail Description :
My requirement is whenever my test case get failed, I want to execute a batch file which will capture the screen shot of that time. so that i will have a screen shot of failure of my test case. I have that batch file which will capture the image. but i dont know how to call that batch file inside catch block of script.

Please help me regarding this

Thanks
Vikky

Comments

  • SumitraSumitra Members
    Hi vikkyjain,

    You can use :

    _execute(command[, isSynchronous]);

    For more Details:

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

    Regards
    Sumitra
  • Hi Sumitra,

    _execute is working very well. I am able to run my batch files.
    Thank u so much for your response.

    Thanks
    Vikky jain
This discussion has been closed.