internet-explorer - Watin - 浏览到 HTTPS 页面

标签 internet-explorer watin

当尝试 GoTo(url) 时出现“此页面正在重定向”弹出窗口时,如何让 Watin 绕过(或单击“确定”)?

最佳答案

用于管理对话框 watin 有 WatiN.Core.DialogHandlers,(如 AlertDialogHandler、ConfirmDialogHandler、FileUploadDialogHandler、PrintDialogHandler 和 LogonDialogHandler。)我认为对于您的示例,我认为应该使用 AlertDialogHandler。

AlertDialogHandler popUp = new AlertDialogHandler();
ie.DialogWatcher.Add(popUp);
ie.GoTO(URL);
if( popUp.Exists())
           {
           popUp.OKButton.Click();
           }
ie.WaitForComplete();

关于internet-explorer - Watin - 浏览到 HTTPS 页面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/260726/

相关文章:

CSS: IE: white-space: nowrap 不工作

c# - 如何减少 Watin 中的 TypeText 延迟?

c# - 如何在Watin等候回邮?

internet-explorer - IE11 中的 "Outline elements"函数在哪里?

javascript - Ajax 成功回调仅适用于 Chrome

tdd - 如何对 404 - Not Found 进行单元测试或集成测试?

c# - WatiN:CurrentThread 需要将其 ApartmentState 设置为 ApartmentState.STA 才能使 Internet Explorer 自动化

c# - 调用的对象已与其客户端断开连接 (WatIn)

javascript - 为什么这个弹出窗口在 IE 上失败?

javascript - 在 IE10 中选择的表单名称无效吗?