Table of Contents

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

element Element

The element to create the adapter for.

Exceptions

NullReferenceException

If element is null.

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

string

AccessKey

The access key character of the element.

public virtual string AccessKey { get; }

Property Value

string

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

string

ClassName

The class name of the element.

public virtual string ClassName { get; }

Property Value

string

ControlType

The control type of the element.

public virtual string ControlType { get; }

Property Value

string

FrameworkId

The name of the underlying UI framework.

public virtual string FrameworkId { get; }

Property Value

string

HelpText

The help text associated with the element.

public virtual string HelpText { get; }

Property Value

string

IsContentElement

A value that specifies whether the element is a content element.

public virtual bool IsContentElement { get; }

Property Value

bool

IsControlElement

A value that indicates whether the element is viewed as a control.

public virtual bool IsControlElement { get; }

Property Value

bool

IsKeyboardFocusable

A value that indicates whether the element can accept keyboard focus.

public virtual bool IsKeyboardFocusable { get; }

Property Value

bool

IsPassword

A value that indicates whether the element contains protected content.

public virtual bool IsPassword { get; }

Property Value

bool

IsRequiredForForm

A value that indicates whether the element is required to be filled out on a form.

public virtual bool IsRequiredForForm { get; }

Property Value

bool

ItemStatus

A description of the status of an item within an element.

public virtual string ItemStatus { get; }

Property Value

string

ItemType

A description of the type of an item.

public virtual string ItemType { get; }

Property Value

string

LocalizedControlType

A description of the control type.

public virtual string LocalizedControlType { get; }

Property Value

string

Name

The name of the element.

public virtual string Name { get; }

Property Value

string

NativeWindowHandle

The handle of the element's window.

public virtual int NativeWindowHandle { get; }

Property Value

int

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

int

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

element Element

The element to convert.

Returns

UIAutomation

The UIAutomation.

Exceptions

ArgumentNullException

If element is null.

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

path string

The search path.

Returns

UIAutomation

The UIAutomation.

Remarks

The DefaultSearchTimeout is used to search for the specified path.

Exceptions

ArgumentNullException

If path is null.

RxPathException

If the specified path is 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

element Element

The element to convert.

Returns

UIAutomation

The UIAutomation.

Exceptions

ArgumentNullException

If element is null.

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

path string

The search path.

Returns

UIAutomation

The UIAutomation.

Remarks

The DefaultSearchTimeout is used to search for the specified path.

Exceptions

ArgumentNullException

If path is null.

RxPathException

If the specified path is not valid.

ElementNotFoundException

If no element is found.

CapabilityNotSupportedException

If the element does not support the capabilities required by this adapter.