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 close a alert thru scripting.

sunnysunny Members
edited April 2013 in Sahi - Open Source
Hi ,

I am using _alert($count.length) in my scripting, the alert displays the value. Here i need to manually click on the ok button on the alert dialog box, but i need to close the alert dialog thru scripting only, is it possible to do so.

Please help me.

Thanks,
Sarathy CR

Best Answers

  • Answer ✓
    Hi,

    Why you used _alert API, if you don't want to see alert box in between the script execution?
  • True story bro ;)

    I would recommend
    if (!_suiteInfo()){
      _alert($stuff);
    }
    

    so that you can alert stuff on manual playback without disturbing your suite runs

    Regards
    Wormi
Sign In or Register to comment.