You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

求助:如何用C#处理Citrix受控浏览器中的弹窗?

问题:无法与Citrix受控浏览器中的弹窗交互

我正在尝试自动化运行在Citrix受控浏览器中的Web应用程序,但无法与执行过程中弹出的窗口进行交互。

已尝试的解决方法

  • 使用Actions类:
Actions actions = new Actions(driver);
actions.sendKeys(Keys.TAB).sendKeys(Keys.ENTER).perform();
  • 尝试作为Alert处理:
try
{
    Alert alert = driver.switchTo().alert();
    alert.accept();
}
catch (NoAlertPresentException e)
{
    System.out.println("No alert found.");
}
  • 使用JavaScript Executor:
((JavascriptExecutor) driver).executeScript("window.confirm = function(){return true;}");

弹窗截图

错误弹窗

内容的提问来源于stack exchange,提问作者Amey

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.14 02:50:53