18 January 2026:
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
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.
Verify popup window is closed is taking lot of time
Hi,
I need to verify if a pop-up window is closed. I am using the following code.
assertFalse(browser.popup("ContentEditor").div("somDivIdHere").exists());
After clicking a link, the pop-up window is getting closed. I need to verify whether pop-up window closed or not. When I am executing the above step, its taking lot of time and the step is getting passed(the "tick" mark is coming for this step). But its not going to the next step.
Any suggestions please.....
I need to verify if a pop-up window is closed. I am using the following code.
assertFalse(browser.popup("ContentEditor").div("somDivIdHere").exists());
After clicking a link, the pop-up window is getting closed. I need to verify whether pop-up window closed or not. When I am executing the above step, its taking lot of time and the step is getting passed(the "tick" mark is coming for this step). But its not going to the next step.
Any suggestions please.....
Comments
When you ask for an object using browser.popup(...), Sahi will throw an error if the window does not exist and stop the script. So this kind of exists statement will fail if the window does not exist.
If windowA opened windowB, and if a handle to windowB is stored in windowA (as a javascript variable), you could do
browser.fetch("windowB && windowB.closed != true") to see if the windowB is still available.
Regards,
Narayan