Class UIAutomation
- Namespace
- Ranorex
- Assembly
- Ranorex.Plugin.Uia.dll
Capability of an UI AutomationElement.
public class UIAutomation : Adapter, IAdapter
- Inheritance
-
UIAutomation
- Implements
- Inherited Members
Constructors
UIAutomation()
Creates a new UIAutomation adapter instance. This constructor is used internally by the Ranorex Core Framework for performance issues!
protected UIAutomation()
UIAutomation(Element)
Creates a new UIAutomation adapter instance.
public UIAutomation(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
AcceleratorKey
The accelerator key combination of the element.
public virtual string AcceleratorKey { get; }
Property Value
AccessKey
The access key character of the element.
public virtual string AccessKey { get; }
Property Value
AutomationElement
The internal AutomationElement used to communicate with this UI element.
public virtual AutomationElement AutomationElement { get; }
Property Value
- AutomationElement
AutomationId
The UI automation identifier of the element.
public virtual string AutomationId { get; }
Property Value
ClassName
The class name of the element.
public virtual string ClassName { get; }
Property Value
ControlType
The control type of the element.
public virtual string ControlType { get; }
Property Value
FrameworkId
The name of the underlying UI framework.
public virtual string FrameworkId { get; }
Property Value
HelpText
The help text associated with the element.
public virtual string HelpText { get; }
Property Value
IsContentElement
A value that specifies whether the element is a content element.
public virtual bool IsContentElement { get; }
Property Value
IsControlElement
A value that indicates whether the element is viewed as a control.
public virtual bool IsControlElement { get; }
Property Value
IsKeyboardFocusable
A value that indicates whether the element can accept keyboard focus.
public virtual bool IsKeyboardFocusable { get; }
Property Value
IsPassword
A value that indicates whether the element contains protected content.
public virtual bool IsPassword { get; }
Property Value
IsRequiredForForm
A value that indicates whether the element is required to be filled out on a form.
public virtual bool IsRequiredForForm { get; }
Property Value
ItemStatus
A description of the status of an item within an element.
public virtual string ItemStatus { get; }
Property Value
ItemType
A description of the type of an item.
public virtual string ItemType { get; }
Property Value
LocalizedControlType
A description of the control type.
public virtual string LocalizedControlType { get; }
Property Value
Name
The name of the element.
public virtual string Name { get; }
Property Value
NativeWindowHandle
The handle of the element's window.
public virtual int NativeWindowHandle { get; }
Property Value
Orientation
The orientation of the control.
public virtual OrientationType Orientation { get; }
Property Value
- OrientationType
ProcessId
The process identifier (ID) of this element.
public virtual int ProcessId { get; }
Property Value
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 UIAutomation FromElement(Element element)
Parameters
elementElementThe element to convert.
Returns
- UIAutomation
The UIAutomation.
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 UIAutomation FromPath(string path)
Parameters
pathstringThe search path.
Returns
- UIAutomation
The UIAutomation.
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.
Operators
implicit operator UIAutomation(Element)
Implicitly converts an Element to an instance of this class.
public static implicit operator UIAutomation(Element element)
Parameters
elementElementThe element to convert.
Returns
- UIAutomation
The UIAutomation.
Exceptions
- ArgumentNullException
If
elementisnull.- CapabilityNotSupportedException
If the element does not support the capabilities required by this adapter.
implicit operator UIAutomation(string)
Implicitly converts a string to an instance of this class by searching the root.
public static implicit operator UIAutomation(string path)
Parameters
pathstringThe search path.
Returns
- UIAutomation
The UIAutomation.
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.