Click or drag to resize
Ranorex

AdapterCreate Method (Type, 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 Adapter Create(
	Type adapterType,
	Element element
)

Parameters

adapterType
Type: SystemType
The type of adapter to construct. The supplied type must inherit from Adapter, but must not be the Adapter type itself.
element
Type: Ranorex.CoreElement
The element associated with the adapter.

Return Value

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