Search code examples
automated-testsdynamics-crmwatindynamics-crm-4

Watin - how to test site with popup pages


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.


Solution

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