watin - 使用 WatiN 检查打开的浏览器

标签 watin

我想检查 IE 是否已经打开

If IE is opened so i.e. Goto("WWW.GOOGLE.COM");
else open new IE and goto Yahoo.com

例如:

 br = new WatiN.Core.IE(@textBox1.Text);

然后,当我按下按钮时,我想检查 IE 是否打开并执行前面的场景。

最佳答案

用途:

IE.Exists(Find.ByUrl("Yahoo.com"));

在 WatiN 2.0 RC1 中,这将是:

Browser.Exists<IE>(Find.ByUrl("Yahoo.com"));

关于watin - 使用 WatiN 检查打开的浏览器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1935808/

相关文章:

c# - 如何将批量文本插入 WatiN 中的文本字段

c# - WatiN:尝试将文本 ("WatiN") 键入 Google 的搜索文本框时出错

asp.net-mvc - ASP.NET MVC - 测试页面到模型绑定(bind)

c# - 如何处理 ie.refresh() 弹出窗口

asp.net - WatiN 还是 Selenium?

.net - 如何在 WatiN 中滚动 Firefox 和 IE?

c# - 瓦廷 : Get Row Count from table

c# - 使用 Watin 更改 IE 实例的代理设置

c# - 在自动化测试中单击元素时遇到问题

c# - IE Web 浏览器控件中的内存泄漏