find descendents

Ask general questions here.
Posts: 21
Joined: Wed Sep 07, 2011 12:38 pm

find descendents

Post by sdimbre » Tue May 08, 2012 9:19 am

I have a 'Ranorex.TrTag' element whose descendents are multiple Span Tags. All these span tags uses class attriutes. Is there any way to findout descendents of type span having some particular class value.

Ex Above mentioned TrTag has span multiple span tags some having class='normal' and some having class='special'. How to find descendents whose class is 'special'.


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

Re: find descendents

Post by Support Team » Tue May 08, 2012 2:13 pm


You can use the following code:
IList<SpanTag> list = YourTrTag.Find<SpanTag>(".//span[@class='special']");
Kind Regards,
Ranorex Support Team