Click or drag to resize
Ranorex

AdapterFindChildT Method (String)

Note: This API is now obsolete.

Finds an immediate child element of the given capability adapter type with a specific label.

Namespace:  Ranorex
Assembly:  Ranorex.Core (in Ranorex.Core.dll) Version: 12.7.4-git.38314c06
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 T FindChild<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: T
The matching element adapter.

Implements

IAdapterFindChildT(String)
Exceptions
ExceptionCondition
ElementNotFoundExceptionIf no element is found.
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