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
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
AccessibleDescription
The Accessibility description assigned to the Qt Element.
public virtual string AccessibleDescription { get; }
Property Value
AccessibleName
The Accessibility name assigned to the Qt Element.
public virtual string AccessibleName { get; }
Property Value
BaseType
The class name of the base component in the Qt libraries.
public virtual string BaseType { get; }
Property Value
InternalId
The (unstable) internal id used to identify the Qt element.
public virtual long InternalId { get; }
Property Value
Name
The name of the Qt element.
public virtual string Name { get; }
Property Value
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
Type
The class name of the Qt component.
public virtual string Type { get; }
Property Value
Methods
FromElement(Element)
Converts an Element to an instance of this class.
public static QtElement FromElement(Element element)
Parameters
elementElementThe element to convert.
Returns
- QtElement
The QtElement.
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 QtElement FromPath(string path)
Parameters
pathstringThe search path.
Returns
- QtElement
The QtElement.
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.
GetPropertyValue(string)
Gets the property value of the specified Qt object.
public virtual object GetPropertyValue(string name)
Parameters
namestringThe 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
namestringThe 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
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
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
elementElementThe element to convert.
Returns
- QtElement
The QtElement.
Exceptions
- ArgumentNullException
If
elementisnull.- 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
pathstringThe search path.
Returns
- QtElement
The QtElement.
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.