Please note that Sahi's development and support teams do not actively monitor this. This is more a community forum. If you are a Sahi Pro user looking for commercial support, please email support @ with your query.

Problem with multiple windows and regex

UncleHorstUncleHorst Members
edited October 2013 in Sahi - Open Source
Hello all,

I have a problem using SAHI OS (Build: 2013-04-29) and Enovia V6. I am using firefox for the tests.

I am working with Enovia V6, which has a web interface.
Enovia uses different windows with some random window name. The values look like ModalDialog plus random number: ModalDialog1234567890 and are not displayed.
My problem is that when you have more than one window, SAHI cannot address the window using _popup().
If you have only one window you can get it using


My idea was to use regex to exclude the first window so that only the second window would be left.
I store the first window name in a variable and build a regex with this:

$dialog = $dialog.slice(11, $dialog.length);
$regex = "ModalDialog(?!" + $dialog + ").*";

_popup($regex)._setValue(_textbox("txtName"), "123");

The regex looks like:


Unfortunatly SAHI does not like this. I get following error:

Window/Domain not found: popupNameFromStep=ModalDialog(?!138200247846; derivedName=; windowName=; windowTitle=Dassault Systemes ENOVIA Corp.; wasOpened=0; domain= at 17.10.2013 11:35:02

It looks to me that the regex is not displayed correctly somehow.
So I hope someone can help me out with this problem here

Thanks in advance
Sign In or Register to comment.