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.

Block popup

vijayvijay Members
edited November -1 in Sahi - Open Source
Till Now I have seen 2 types of popup

1 : One created by Browser
in condition(user edits the page and tries to "reload" that same page )
here it gives the popup "are u shure u want to reload this page?"
SO this popup is created By browser

2: Other Created By my Own Application
in condition( like normal save alert on saving data )
SO this popup is created By my Own Application

Sahi Sucessfully closes both

But How I ll i stop Sahi from Closing "my Own Applications popup"
As there is error While Saving Data.


CODE::

_click(_link("Create / Modify Address Nature"));
_click(_link("Create New"));
_setValue(_textbox(8),"test");

_click(_submit("Save")); //
AFTER SAVE THERE IS failure popup
_wait(20000);//
HERE SAHI IS CLOSING POPUP WHICH I which i want to see and rectify
_takeSnapShots(true);


PLease Help............"How s Will i disable popup blocking at this step and enable it whenever required"

Comments

  • You can't afaik.

    Sahi will close the popup so it don't halts execution of scripts. But if you have to assert the popups contents, you can use _lastConfim()

    Does this help?

    Regards
    Wormi
  • yay that shoot mi problem
Sign In or Register to comment.