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 avoid window automatically closing after complection of Suite

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

Q1) Is there any way to avoid Window automatically closing after complection of Test Suite/Batch ?

because i have 2 Sahi scripts in my Suite at the end of the execution i don't want to automatically close the final window result page. please help me


Q2) Is there any way to take Print Screen using Sahi Script.


OS: Window XP

Browser: IE8

Sahi Build :2011-07-19

Comments

  • Thanks Wormi....

    Is there any solution for Q1 ie; Stop window automatically closing after end of the Suite/Batch file . Please suggested because as per my project requirement is window should not close :(
  • Hi Anilkumar,

    To prevent window from automatically closing after the end of the Suite/Batch file, add an explicit wait with large time interval in milliseconds

    For eg:
    _wait(1000000000);

    will make the execution to wait for long time before returning Success.

    This might help you.

    Regards,
    Theeran.
  • Or.. if it is not enough write a _wait loop with a _confirm. Sahi can access the return values of a confirm so something like

    until (_confirm("Can the browser be closed?")){
    _wait(1000000000000);
    }

    should work
Sign In or Register to comment.