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.

Failure to if a Popup window is available

MarkMark Members
edited July 2014 in Sahi Pro
I'm using a demo version of Sahi Pro v5.1.2, and having great difficulty establishing whether or not a Popup window exists.
If the popup has not been created (because my application workflow failed) there seems to be no Sahi way of checking of checking to see if a window that was supposed to have opened is actually open. Please help. This is a major block to regression testing for my application.

Background:
1. Main window "A" opens a Popup "B".
2. Depending on user choices in Window "A" workflow, Popup "B" can redirect to a new window Popup "C".
I need to test if Popup "C" has been instantiated.

These all fail with the following Error message:

Window/Domain not found: popupNameFromStep=SF-42400000003 for FOA00000001; derivedName=; windowName=; windowTitle=Sahi Start; wasOpened=0; domain=
--Stopped Playback: FAILURE--

And in the log:

_debug(_popup("SF-42400000003 for FOA00000001").exists())
Window/Domain not found: popupNameFromStep=SF-42400000003 for FOA00000001; derivedName=; windowName=; windowTitle=Sahi Start; wasOpened=0; domain= at Jul 27, 2014 11:11:43 AM

Here are the ways I've attempted to check to see if a particular Popup window is available:

var $popupname = "SF-42400000003 for FOA00000001";
_debug($popupname);

var $exists = _popup($popupname).exists();
_debug($exists)

var $exists = _exists(_popup($popupname));
_debug($exists)

var $exists = _condition(_popup($popupname).exists());
_debug($exists)

var $exists = _condition(_exists(_popup($popupname)));
_debug($exists)

var $exists = _popup($popupname).isVisible();
_debug($exists)

var $exists = _isVisible(_popup($popupname));
_debug($exists)

var $exists = _condition(_popup($popupname).isVisible());
_debug($exists)

var $exists = _condition(_isVisible(_popup($popupname)));
_debug($exists)

Also, I've tried all the asserts.
I tried:
onScriptFailure($exception)
onScriptError($exception)

To try and workaround the failure to check if a Popup exists. No success!

Any help = much appreciated!

I will gladly setup a WebEx meeting to demo the error/trouble-shoot if that would help (you will have to establish that you are either a moderator on this group, or a Sahi employee).

-Mark.
Sign In or Register to comment.