Class UIAutomationInvoke
- Namespace
- Ranorex
- Assembly
- Ranorex.Plugin.Uia.dll
Capability for the UIA Invoke pattern.
public class UIAutomationInvoke : Adapter, IAdapter
- Inheritance
-
UIAutomationInvoke
- Implements
- Inherited Members
Constructors
UIAutomationInvoke()
Creates a new UIAutomationInvoke adapter instance. This constructor is used internally by the Ranorex Core Framework for performance issues!
protected UIAutomationInvoke()
UIAutomationInvoke(Element)
Creates a new UIAutomationInvoke adapter instance.
public UIAutomationInvoke(Element element)
Parameters
elementElementThe element to create the adapter for.
Exceptions
- NullReferenceException
If
elementisnull.- CapabilityNotSupportedException
If the element does not support the capabilities required by this adapter.
Properties
RequiredCapabilities
Capabilities required by the adapter implementation.
protected override string[] RequiredCapabilities { get; }
Property Value
- string[]
Methods
FromElement(Element)
Converts an Element to an instance of this class.
public static UIAutomationInvoke FromElement(Element element)
Parameters
elementElementThe element to convert.
Returns
- UIAutomationInvoke
The UIAutomationInvoke.
Exceptions
- ArgumentNullException
If
elementisnull.- CapabilityNotSupportedException
If the element does not support the capabilities required by this adapter.
FromPath(string)
Converts a string to an instance of this class by searching the root.
public static UIAutomationInvoke FromPath(string path)
Parameters
pathstringThe search path.
Returns
- UIAutomationInvoke
The UIAutomationInvoke.
Remarks
The DefaultSearchTimeout is used to search for the specified path.
Exceptions
- ArgumentNullException
If
pathisnull.- RxPathException
If the specified
pathis not valid.- ElementNotFoundException
If no element is found.
- CapabilityNotSupportedException
If the element does not support the capabilities required by this adapter.
Invoke()
Sends a request to the element to initiate its action.
[OriginalDisplayName("UIAutomationInvokeInvoke")]
public virtual void Invoke()
Exceptions
- ActionFailedException
Thrown if invoking the action failed.
Operators
implicit operator UIAutomationInvoke(Element)
Implicitly converts an Element to an instance of this class.
public static implicit operator UIAutomationInvoke(Element element)
Parameters
elementElementThe element to convert.
Returns
- UIAutomationInvoke
The UIAutomationInvoke.
Exceptions
- ArgumentNullException
If
elementisnull.- CapabilityNotSupportedException
If the element does not support the capabilities required by this adapter.
implicit operator UIAutomationInvoke(string)
Implicitly converts a string to an instance of this class by searching the root.
public static implicit operator UIAutomationInvoke(string path)
Parameters
pathstringThe search path.
Returns
- UIAutomationInvoke
The UIAutomationInvoke.
Remarks
The DefaultSearchTimeout is used to search for the specified path.
Exceptions
- ArgumentNullException
If
pathisnull.- RxPathException
If the specified
pathis not valid.- ElementNotFoundException
If no element is found.
- CapabilityNotSupportedException
If the element does not support the capabilities required by this adapter.