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.

Closeing Popup Tab

DwarFDwarF Members
edited November -1 in Sahi - Open Source
We are running all our tests using the Java driver. (The tool is fantastic btw).

We are having an issue when a page should open a popup (configured to pop-up into a new tab, then needs to close it. The close is accomplished through (pseudo code):
Browser b;
b.link(0).in(<ElementStub>cell).click();
net.sf.sahi.client.Browser popup = b.popup(pageHeader); //opened in previous line
popup.close();

We get a non-javascript notification:
The webpage you are viewing is trying to close the tab.
Do you want to close this tab?
Yes No

This is using IE8

How can we select OK without using the awt robot?

Comments

  • narayannarayan Administrators
    Hi DwarF,

    Are you using the latest version of Sahi? We had fixed this bug in the May release.

    Regards,
    Narayan
  • DwarFDwarF Members
    No, I was on the April 4th release. Let me give the newest one a go and see.

    Thanks
  • DwarFDwarF Members
    The sahi_20110525 build does close the tab properly, thank you.
This discussion has been closed.