Click or drag to resize
Ranorex

AdapterTryCreateT Method (Element, T)

Tries to construct 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 bool TryCreate<T>(
	Element element,
	out T adapter
)
where T : Adapter

Parameters

element
Type: Ranorex.CoreElement
The element associated with the adapter.
adapter
Type: T
When this method returns, the created adapter instance, if it could be created; otherwise a null reference.

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: Boolean
true if an adapter was successfully created, otherwise false.
See Also