【问题标题】:How to close a popup window in sahi?如何在 sahi 中关闭弹出窗口?
【发布时间】:2020-01-10 21:01:12
【问题描述】:

' 如何在 sahi 中关闭弹出窗口?

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

{

} 我收到错误 WindowExists 未定义,而我已经在程序开始时将其定义为 var windowExists = "Technischer Fehler";

谁能指导一下'

【问题讨论】:

    标签: sahi


    【解决方案1】:

    看看https://sahipro.com/docs/sahi-apis/popup-windows.html#_windowExists

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

    有一段时间没有使用 Sahi,但如果我没记错的话,你不能只在 if 语句中使用 Sahi API。是的https://sahipro.com/docs/sahi-apis/fetch-apis.html#Generic%20attribute%20fetching%20mechanism 你必须使用_condition

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2023-02-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多