Click or drag to resize
Ranorex

AdapterCreateT Method (Element)

Constructs an adapter of a specific type for a given element.

Namespace:  Ranorex
Assembly:  Ranorex.Core (in Ranorex.Core.dll) Version: 12.7.4-git.38314c06
Syntax
public static T Create<T>(
	Element element
)
where T : Adapter

Parameters

element
Type: Ranorex.CoreElement
The element associated with the adapter.

Type Parameters

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

Return Value

Type: T
The adapter instance.
Exceptions
ExceptionCondition
ArgumentNullExceptionIf element is null.
CapabilityNotSupportedExceptionIf the element does not support the capabilities required by this adapter.
RanorexExceptionIf generating the adapter fails for another reason.
See Also