华廷 - 如何测试与弹出的网页网站 [英] Watin - how to test site with popup pages
本文介绍了华廷 - 如何测试与弹出的网页网站的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用的是华廷(Web应用程序测试的.NET)做一个Dynamics CRM 4.0的网站集成测试。
CRM使用了大量的弹出窗口 - 例如,单击列表中的联系人将打开联系人的详细信息的新的浏览器窗口
我想测试一下:
- 登录CRM(完成)
- 进入联系人列表(完成)
- 单击上的接触,从而触发弹出式(完成)
- 联系人实体/表内测试功能(不能做)
所以,我需要得到弹出窗口的保持。
怎么样?
感谢。
解决方案
//打开弹出窗口后点击:
IE iepopup_1 = IE.AttachToIE(Find.ByUrl(theUrlOfThePopup));
//对iepopup_1操作
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.
I want to test:
- login to CRM (done)
- go to the Contact list (done)
- click on an Contact, thus trigger the popup (done)
- test functionality within the Contact entity/form (can't do)
So I need to get hold of the popped up window. How?
Thanks.
解决方案
//after the click that opens the popup:
IE iepopup_1 = IE.AttachToIE(Find.ByUrl(theUrlOfThePopup));
//operate on iepopup_1
这篇关于华廷 - 如何测试与弹出的网页网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文