Watin 的 LogonDialogHandler 不适用于 Firefox 3.6

发布于 2024-12-20 13:18:42 字数 394 浏览 0 评论 0原文

我正在使用 WatiN 为网站编写自动化脚本。当我浏览到特定网址时,会弹出一个身份验证对话框。我有以下代码来处理该对话框。这段代码基本上输入了指定的内容

// Create a logon dialog handler
LogonDialogHandler ldh = new LogonDialogHandler(user, password);
browser.DialogWatcher.Add(ldh); 
browser.GoTo("URL that pops up the authentication dialog");

,现在这在 IE 中工作得很好。但在 Firefox 中,会出现该对话框,之后什么也没有发生。 (文本框中没有输入用户名或密码)

知道这里出了什么问题吗?

I'm writing automation scripts for a website using WatiN. when I browse to a particular url, a authentication dialog pops up. I have following code to handle the dialog. This code basically enters the specified

// Create a logon dialog handler
LogonDialogHandler ldh = new LogonDialogHandler(user, password);
browser.DialogWatcher.Add(ldh); 
browser.GoTo("URL that pops up the authentication dialog");

Now this works just fine in IE. But in Firefox, the dialog appears and nothing happens after that. (No username or password entered in their text boxes)

Any idea what's going wrong here?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

如若梦似彩虹 2024-12-27 13:18:42

抱歉,WatiN 目前不支持 Firefox 弹出窗口/对话框的自动化(WatiN 2.1 及更低版本)。也许可以做到,但这在我的优先事项列表中并不高。

I'm sorry but the automation of firefox popups/dialogs is not supported by WatiN at this moment (WatiN 2.1 and lower). It probably can be done but this is not high on my priority list.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文