Table of Contents

Class QtElement

Namespace
Ranorex
Assembly
Ranorex.Plugin.Qt.dll

The element is a part of a Qt application.

public class QtElement : Adapter, IAdapter
Inheritance
QtElement
Implements
Inherited Members

Constructors

QtElement()

Creates a new QtElement adapter instance. This constructor is used internally by the Ranorex Core Framework for performance issues!

protected QtElement()

QtElement(Element)

Creates a new QtElement adapter instance.

public QtElement(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

AccessibleDescription

The Accessibility description assigned to the Qt Element.

public virtual string AccessibleDescription { get; }

Property Value

string

AccessibleName

The Accessibility name assigned to the Qt Element.

public virtual string AccessibleName { get; }

Property Value

string

BaseType

The class name of the base component in the Qt libraries.

public virtual string BaseType { get; }

Property Value

string

InternalId

The (unstable) internal id used to identify the Qt element.

public virtual long InternalId { get; }

Property Value

long

Name

The name of the Qt element.

public virtual string Name { get; }

Property Value

string

RequiredCapabilities

Capabilities required by the adapter implementation.

protected override string[] RequiredCapabilities { get; }

Property Value

string[]

ToolTip

The tooltip text set on the widget.

public virtual string ToolTip { get; }

Property Value

string

Type

The class name of the Qt component.

public virtual string Type { get; }

Property Value

string

Methods

FromElement(Element)

Converts an Element to an instance of this class.

public static QtElement FromElement(Element element)

Parameters

element Element

The element to convert.

Returns

QtElement

The QtElement.

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 QtElement FromPath(string path)

Parameters

path string

The search path.

Returns

QtElement

The QtElement.

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.

GetPropertyValue(string)

Gets the property value of the specified Qt object.

public virtual object GetPropertyValue(string name)

Parameters

name string

The name of the property.

Returns

object

The value of the property.

Exceptions

ActionFailedException

Thrown if invoking the action failed.

InvokeMethod(string)

Invokes a method with no arguments on the specified Qt object.

public virtual void InvokeMethod(string name)

Parameters

name string

The name of the method.

Exceptions

ActionFailedException

Thrown if invoking the action failed.

PerformClick()

Sends a mouse left button click event to the target.

public virtual void PerformClick()

Exceptions

ActionFailedException

Thrown if invoking the action failed.

PerformClick(int, int)

Sends a mouse left button click event on the target.

public virtual void PerformClick(int x, int y)

Parameters

x int

The x client coordinates.

y int

The y client coordinates.

Exceptions

ActionFailedException

Thrown if invoking the action failed.

SetPropertyValue(string, object)

Sets the property value of the specified Qt object.

public virtual void SetPropertyValue(string name, object value)

Parameters

name string

The name of the property.

value object

The value of the property to set.

Exceptions

ActionFailedException

Thrown if invoking the action failed.

Operators

implicit operator QtElement(Element)

Implicitly converts an Element to an instance of this class.

public static implicit operator QtElement(Element element)

Parameters

element Element

The element to convert.

Returns

QtElement

The QtElement.

Exceptions

ArgumentNullException

If element is null.

CapabilityNotSupportedException

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

implicit operator QtElement(string)

Implicitly converts a string to an instance of this class by searching the root.

public static implicit operator QtElement(string path)

Parameters

path string

The search path.

Returns

QtElement

The QtElement.

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.