 | 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
Syntaxpublic static bool TryCreate<T>(
Element element,
out T adapter
)
where T : Adapter
Public Shared Function TryCreate(Of T As Adapter) (
element As Element,
<OutAttribute> ByRef adapter As T
) As Boolean
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:
Booleantrue if an adapter was successfully created, otherwise
false.
See Also