Hi,
This is a somewhat convoluted request, but I'll do my best to describe it!
I am trying to test a section of our app, and we are using the Rad Treeview control which has been slightly modified to incorporate some extra functionality. From what I can see, on the front end the treeview is built using a series of divs and spans, most of which use the same classes. I am trying to find particular nodes in the treeview but our modifications pass id's (which are randomly generated) to the particular nodes, so I cannot use these for finding elements.
A sample of code containing the elements I am trying to find is below. In particular I am trying to find the span with the id thisSpan_randomId. All of the specific attributes of this element are shared with other objects in the DOM.
Using the Find Element dialog, I can locate the parent of the element I am trying to find using TextContent is exactly TS Test Region, but the child has no particular identifiers that I can use that are not already shared with other elements on the page.
Is there a way I can find this child element (with no unique identifiers) by first finding the parent (with unique identifiers)?
Hopefully this makes a bit of sense!
Cheers,
Lachlan
This is a somewhat convoluted request, but I'll do my best to describe it!
I am trying to test a section of our app, and we are using the Rad Treeview control which has been slightly modified to incorporate some extra functionality. From what I can see, on the front end the treeview is built using a series of divs and spans, most of which use the same classes. I am trying to find particular nodes in the treeview but our modifications pass id's (which are randomly generated) to the particular nodes, so I cannot use these for finding elements.
A sample of code containing the elements I am trying to find is below. In particular I am trying to find the span with the id thisSpan_randomId. All of the specific attributes of this element are shared with other objects in the DOM.
<div class="rtBot"> <span class="rtSp"></span> <span class="rtPlus"></span> <img src="" longdesc="Region" alt="" class="rtImg"> <span class="rtIn">TS Test Region <span class="tvContext" name="contextMenu" style="display:none;" id="thisSpan_randomId"> <a href='javascript:addRegionAccess("","747383be52bd4960b0b12331ed690c26", "TS%20Test%20Region");' innerhtml="Add Region Access" class="addRegion">Add Region Access</a> </span> </span> </div>Using the Find Element dialog, I can locate the parent of the element I am trying to find using TextContent is exactly TS Test Region, but the child has no particular identifiers that I can use that are not already shared with other elements on the page.
Is there a way I can find this child element (with no unique identifiers) by first finding the parent (with unique identifiers)?
Hopefully this makes a bit of sense!
Cheers,
Lachlan