Pop-up Watcher Class

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
AndyS
Posts: 14
Joined: Wed Jan 07, 2015 10:01 pm

Pop-up Watcher Class

Post by AndyS » Tue Feb 24, 2015 8:19 pm

Hi,

I am new to programming and I am trying to implement the pop-up watcher class in my project. I would like some help adding this functionlity to my project.

First the pop-up I am trying to catch with this class is identified by the following ID:

ctl00_TemplateBody_ucNewMembership_ucMemberContact_pnlDuplicates

and it contains two options to dismiss the pop-up

ctl00$TemplateBody$ucNewMembership$ucMemberContact$btnDuplicateSave
ctl00$TemplateBody$ucNewMembership$ucMemberContact$btnDuplicateCancel

Can anyone suggest how to begin implementing this class given this minimal amount of information I have to start with. I am sorry if my post is lacking in enough background information but I will supply it as requested.

Project was created using C#.

Thanks,
Andy

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Pop-up Watcher Class

Post by Support Team » Wed Feb 25, 2015 6:00 pm

Hi Andy,

There is a section in our user guide which describes how to use the popup watcher.
Maybe this will help you solving your issue.
You can find the section using the following link: Handling unexpected Dialogs

Regards,
Bernhard
.
Image

AndyS
Posts: 14
Joined: Wed Jan 07, 2015 10:01 pm

Re: Pop-up Watcher Class

Post by AndyS » Tue Mar 03, 2015 10:55 pm

I have read the instructions but I still have questions.

One of the options in this class is as follows:

// Add a Watch using the info object of the dialog and the info object of the button to click

The above is just one of the ways you can identify an object and interact with it but I dont know what it means when it says "Add a Watch using the info object of the dialog". How would I locate this? Can I use the track feature in Ranorex to locate the info object? Can anyone provide an example?

Thanks,
Andy

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Pop-up Watcher Class

Post by Support Team » Thu Mar 05, 2015 4:25 pm

Hello Andi,

This is the explanation for the example directly after this line.

myPopupWatcher.WatchAndClick(repo.UpdateCheckDialog.SelfInfo, repo.UpdateCheckDialog.btCloseInfo);

Almost every element has an info object. Please take a look at the image below.
InfoObj.png
InfoObj.png (4.09 KiB) Viewed 1145 times
I hope this answers your question.

Regards,
Bernhard
.
Image