简体   繁体   中英

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'

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"))) { ...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM