Unable to add object 'Add Matching Children to Repository'

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
Kumar
Posts: 24
Joined: Fri Aug 03, 2012 12:12 pm

Unable to add object 'Add Matching Children to Repository'

Post by Kumar » Mon Aug 06, 2012 2:44 pm

Hi,

I have scenarios were a number of check boxes will be displayed, i need to validated the list by comparing the check box names against my list (which can be in excel or from DB)

I followed the details in the below link and was able to get the objects which will be referring to all the check box which i need
http://www.ranorex.com/support/user-gui ... -mode.html

Please find the attached screenshot showing the snapshot of the Spy, but I am not able to add this object to repository. No errors are displayed but the object is also not added.

I also tried the below

Code: Select all

IList<CheckBox> list = repo.CodeListNewFormMozillaFirefox.Grouping.FindDescendants<CheckBox>;
int cnt = list.Count;
where "Grouping" is the container in which the check boxes are arranged. I get message as
"Cannot convert method group 'FindDescendants' to non-delegate type 'System.Collections.Generic.IList<Ranorex.CheckBox>'. Did you intend to invoke the method? (CS0428)"
It would be very helpful if i can get some help in finding out the correct way to do it.

Thanks & Regards,
Kumar
You do not have the required permissions to view the files attached to this post.

Kumar
Posts: 24
Joined: Fri Aug 03, 2012 12:12 pm

Re: Unable to add object 'Add Matching Children to Repository'

Post by Kumar » Mon Aug 06, 2012 3:10 pm

Found my mistake with the second method. I had missed ()
The below code worked:

Code: Select all

IList<CheckBox> list = repo.CodeListNewFormMozillaFirefox.Grouping.FindDescendants<CheckBox>();
int cnt = list.Count
Thanks,
Kumar

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Unable to add object 'Add Matching Children to Repository'

Post by Support Team » Mon Aug 06, 2012 3:37 pm

Hi,

I think the problem why the specific element couldn't be added is that it already exists in the repository.
From the screenshot you sent it seems that every check box has the same RxPath, did you already add one of the check boxes to the repository?

Regards,
Markus
Ranorex Support Team