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.

Popup close method is not working properly

lshankar_mcalshankar_mca Members
edited November -1 in Sahi - Open Source
Hi Narayan,

I am using sahi java api to automate my application.
Here I am getting one issue with Popup close.
When i use browser.popup("/.*/").close();
it is closing the main window instead of the closing the popup window.

Please help me how to handle this scenario.

Regards,
Shankar L

Comments

  • Hi Narayan,

    Please help me how to close the popup window using the Sahi Java API.
  • Hopefully you would have figured out how to do so. In case you have not then you can try this solution.

    Define the method like below:

    public void closePopup(String popupName) {
    browser.popup(popupName).close();
    }

    Call the method wherever required:
    closePopup("actualPopupName");
Sign In or Register to comment.