Click or drag to resize
Ranorex

IElement Interface

Represents an UI item in the global UI tree. Instances of this class dynamically implement a Role and optional Capabilities, as well as numerous standard properties.

Namespace:  Ranorex.Core
Assembly:  Ranorex.Core (in Ranorex.Core.dll) Version: 12.7.4-git.38314c06
Syntax
public interface IElement

The IElement type exposes the following members.

Properties
  NameDescription
Public propertyActions
A list of actions the element supports. This list is aggregated from the role and the capabilities.
Public propertyAttributes
A list of attributes the element supports. This list is aggregated from the role and the capabilities.
Public propertyCapabilities
The list of the capabilities the element has.
Public propertyChildIndex
The index of this element in the parent's child list. Is '-1' if the index is unknown.
Public propertyChildren
The list of children the element has.
Public propertyClientRectangle
The bounding rectangle of the element, relative to the parent.
Public propertyDynamicCapability
Gets a capability providing dynamic attributes and actions that the element supports.
Public propertyEnabled
True if the element is enabled.
Public propertyFlavorElement
The flavor element associated with the element. This can be null, for example when using static snapshots.
Public propertyFlavorName
The name of the flavor this element belongs to.
Public propertyHasFocus
True if the element has the focus.
Public propertyIsRemote
Gets a value indicating whether the element resides on a remote device.
Public propertyIsSnapshot
Gets a value indicating whether this instance is a snapshot.
Public propertyItem
Indexer for attribute access.
Public propertyLimitations
Gets a list of technology specify limitations that are associated with this element.
Public propertyLocation
The location of the element, relative to its parent.
Public propertyParent
The parent of the element.
Public propertyPreferredCapability
The preferred capability of the element.
Public propertyRole
The role of the element (= main capability).
Public propertyScreenLocation
The location of the element in screen coordinates.
Public propertyScreenRectangle
The bounding rectangle of the element in screen coordinates.
Public propertySize
The (x,y) size of element.
Public propertyTopLevelAncestor
The top-level ancestor of the element.
Public propertyValid
Returns true if the element is believed to be valid.
Public propertyVisible
True if the element is visible.
Top
Methods
  NameDescription
Public methodAsT
Returns an adapter of the specified type for the element.
Public methodCaptureCompressedImage
Captures a PNG image of the element.
Public methodEnsureVisible
Tries to make the element visible to the user. This is usually accomplished by bringing the element or one of its ancestors to foreground.
Public methodFind(RxPath)
Applies a Ranorex Path to the element.
Public methodFind(RxPath, Duration)
Applies a Ranorex Path to the element.
Public methodFindFromPoint(Point)
Find an element by screen location. The found element is a descendant of this instance or this instance itself.
Public methodFindFromPoint(Point, RxPath)
Find an element by screen location and build its RxPath. The found element is a descendant of this instance or this instance itself.
Public methodFindFromUid
Finds a descendant element by its unique identifier attribute (defined by the owner flavor UidAttribute name).
Public methodFindSingle(RxPath)
Applies a Ranorex Path to the element.
Public methodFindSingle(RxPath, Duration)
Applies a Ranorex Path to the element.
Public methodFocus
Tries to set the focus on the element.
Public methodGetAttributeValue
Returns the value of an attribute.
Public methodGetAttributeValueText(String)
Returns the value of an attribute converted to its string representation.
Public methodGetAttributeValueText(String, Regex)
Returns the value of an attribute converted to its string representation. If a regex is provided, only the part of the string representation matching the regular expression is returned.
Public methodGetObjectData
For Ranorex internal use only. Populates a SerializationInfo with the data needed to serialize the target object.
Public methodGetPath(PathBuildMode)
Builds an absolute RxPath to the element.
Public methodGetPath(PathBuildMode, Element)
Builds an RxPath to the element, relative to another element.
Public methodGetRobustPath
Builds an absolute robust RxPath to the element.
Public methodHasCapability
Tests if the element possesses a certain capability (or role), by name.
Public methodInvokeAction
Invokes an action on the element.
Public methodInvokeActionWithText
Invokes an action on the element.
Public methodIsAncestor
Determines whether the current element is an ancestor of the specified child element.
Public methodIsEqual
Compares two elements by comparing their flavor elements or their screen rectangles if no flavor comparison is possible.
Public methodSetAttributeValue(String, Object)
Sets the value of an attribute.
Public methodSetAttributeValue(String, String)
Sets the value of an attribute.
Public methodTryFindSingle(RxPath, Element)
Tries to apply a Ranorex Path to the element.
Public methodTryFindSingle(RxPath, Duration, Element)
Tries to apply a Ranorex Path to the element.
Top
See Also