Watin - 如何使用弹出页面测试网站 [英] Watin - how to test site with popup pages

查看:13
本文介绍了Watin - 如何使用弹出页面测试网站的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 WatiN(.Net 中的 Web 应用程序测试)在 Dynamics CRM 4.0 网站上进行集成测试.CRM 使用大量弹出窗口 - 例如,单击列表中的联系人会打开一个包含联系人详细信息的新浏览器窗口.

I'm using WatiN (Web Application Testing in .Net) to do integration testing on a Dynamics CRM 4.0 website. CRM uses a lot of popup windows - eg clicking on a Contact in a list opens a new browser window with the Contact's details.

我要测试:

  • 登录 CRM(完成)
  • 转到联系人列表(完成)
  • 点击一个联系人,从而触发弹出窗口(完成)
  • 在联系人实体/表单中测试功能(不能)

所以我需要抓住弹出的窗口.怎么样?

So I need to get hold of the popped up window. How?

谢谢.

推荐答案

//after the click that opens the popup:    
IE iepopup_1 = IE.AttachToIE(Find.ByUrl(theUrlOfThePopup));
//operate on iepopup_1

这篇关于Watin - 如何使用弹出页面测试网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆