Click or drag to resize
Ranorex

AdapterFindDescendantsT Method (String)

Note: This API is now obsolete.

Finds all descendants of the given capability adapter type with a specific label.

Namespace:  Ranorex
Assembly:  Ranorex.Core (in Ranorex.Core.dll) Version: 10.2.5+git.08880485
Syntax
[ObsoleteAttribute("This method will be removed because its usage is misleading when compared to other Find methods, which all take a RanoreXPath as argument. Instead of this method use Find or FindSingle with an explicit RanoreXPath as generated by Ranorex Spy.")]
public IList<T> FindDescendants<T>(
	string defaultLabel
)
where T : Adapter

Parameters

defaultLabel
Type: SystemString
The label to search by ('defaultlabel' attribute).

Type Parameters

T
The adapter type to use. The supplied type must inherit from Adapter, but most not be the Adapter type itself.

Return Value

Type: IListT
A list of matching element adapters.

Implements

IAdapterFindDescendantsT(String)
Remarks
The 'defaultlabel' of an element is a string value Ranorex uses to label an element in the element tree in Ranorex Spy. It is generated by searching all capabilities of an element for an explicitly marked label attribute and uses that value if found, otherwise just uses any attribute value. As such, the defaultlabel is not fully stable and in general should not be used to identify an element. Instead of this method use Find or FindSingle with an explicit RanoreXPath as generated by Ranorex Spy.
See Also