JBOSSUSER
JBOSSUSER

Reputation: 35

How to close a popup window in sahi?

' How to close a popup window in sahi ?

 if(_windowExists("Technischer Fehler"))
 {
 _click(_link("SCHLIESSEN"));
 }
else

{

} I get the error WindowExists is not defined whereas I have already defined it at the start of the program as var windowExists = "Technischer Fehler";

Can anyone please guide'

Upvotes: 0

Views: 138

Answers (1)

globalworming
globalworming

Reputation: 767

have a look at https://sahipro.com/docs/sahi-apis/popup-windows.html#_windowExists

var $exists = _windowExists("/demo/");

haven't used Sahi in a while, but if i remember correctly, you can't just use the Sahi API in if statements. Yeah https://sahipro.com/docs/sahi-apis/fetch-apis.html#Generic%20attribute%20fetching%20mechanism you have to use _condition.

if (_condition(_windowExists("Technischer Fehler"))) { ...

Upvotes: 0

Related Questions