0
我正在使用Watin和Nant为我的网站创建单元测试。如何测试弹出IE窗口的内容
我想知道如何测试弹出IE窗口的内容。 那个窗口,当用户点击有目标=“_空白”的链接在下面的例子中
<p>
... receives oversight and governance from the
<a target="_blank" href="ihealth.html">iHealth Alliance</a>,
a not-for-profit organization .... </p>
这里打开,就像是我试图使用代码:
_ie = new IE(SITE_ROOT);
_ie.Link(f => f.Text == "iHealth Alliance").Click();
//here i need to enter something to check if popup window has appropriate title
//something like Assert.AreEqual("My page title to test", _ie.ChildWindows[0].Title)
由于我可以看到,Watin的API允许在一个IE窗口中搜索控件,但由于某些原因,它不会跟踪因工作主窗口而打开的新窗口。 绝对应该有一些像ChildWindows或PopupWindows系列
你能告诉我如何做到这一点吗?
谢谢!