RanorexRanorex Documentation
Element Class
NamespacesRanorex.CoreElement
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.
Declaration Syntax
C#Visual BasicVisual C++
<SerializableAttribute> _
Public Class Element _
	Inherits MarshalByRefObject _
	Implements ISerializable
[SerializableAttribute]
public ref class Element : public MarshalByRefObject, 
	ISerializable
Members
All MembersMethodsProperties



IconMemberDescription
Actions
A list of actions the element supports. This list is aggregated from the role and the capabilities.

As<(Of <(T>)>)()()()
Returns an adapter of the specified type for the element.

Attributes
A list of attributes the element supports. This list is aggregated from the role and the capabilities.

Capabilities
The list of the capabilities the element has.

CaptureCompressedImage()()()
Captures a PNG image of the element.

ChildIndex
The index of this element in the parent's child list. Is '-1' if the index is unknown.

Children
The list of children the element has.

ClientRectangle
The bounding rectangle of the element, relative to the parent.

CreateObjRef(Type)
Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
(Inherited from MarshalByRefObject.)
DynamicCapability
Gets a capability providing dynamic attributes and actions that the element supports.

Enabled
True if the element is enabled.

EnsureVisible()()()
Tries to make the element visible to the user. This is usually accomplished by bringing the element or one of its ancestors to foreground.

Equals(Element, Element)
Returns true if the two instances are considered equal.

Equals(Object)
Compares the element to an object.
(Overrides Object.Equals(Object).)
Events
A list of events this element supports. This list is aggregated from the role and the capabilities.

Finalize()()()
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Find(RxPath)
Applies a Ranorex Path to the element.

Find(RxPath, Duration)
Applies a Ranorex Path to the element.

FindFromPoint(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.

FindFromPoint(Point)
Find an element by screen location. The found element is a descendant of this instance or this instance itself.

FindFromUid(String, Element%)
Finds a descendant element by its unique identifier attribute (defined by the owner flavor UidAttribute name).

FindSingle(RxPath)
Applies a Ranorex Path to the element.

FindSingle(RxPath, Duration)
Applies a Ranorex Path to the element.

FlavorElement
The flavor element associated with the element. This can be null, for example when using static snapshots.

FlavorName
The name of the flavor this element belongs to.

Focus()()()
Tries to set the focus on the element.

GetAttributeValue(String)
Returns the value of an attribute.

GetAttributeValueText(String)
Returns the value of an attribute converted to its string representation.

GetAttributeValueText(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.

GetHashCode()()()
Default implementation override.
(Overrides Object.GetHashCode()()().)
GetLifetimeService()()()
Retrieves the current lifetime service object that controls the lifetime policy for this instance.
(Inherited from MarshalByRefObject.)
GetPath(PathBuildMode, Element)
Builds an RxPath to the element, relative to another element.

GetPath(PathBuildMode)
Builds an absolute RxPath to the element.

GetType()()()
Gets the type of the current instance.
(Inherited from Object.)
HasCapability(String)
Tests if the element posesses a certain capability (or role), by name.

HasFocus
True if the element has the focus.

Implicit(String)
Implicitly converts a string to an element instance by searching the root.

InitializeLifetimeService()()()
Obtains a lifetime service object to control the lifetime policy for this instance.
(Inherited from MarshalByRefObject.)
InvokeAction(String, array<Object>[]()[])
Invokes an action on the element.

InvokeActionWithText(String, array<String>[]()[])
Invokes an action on the element.

IsAncestor(Element)
Determines whether the current element is an ancestor of the specified child element.

IsEqual(Element)
Compares two elements by comparing their flavor elements or their screen rectangles if no flavor comparison is possible.

IsRemote
Gets a value indicating whether the element resides on a remote device.

IsSnapshot
Gets a value indicating whether this instance is a snapshot.

Item[([(String])])
Indexer for attribute access.

Limitations
Gets a list of technology specifiy limitations that are associated with this element.

Location
The location of the element, relative to its parent.

MemberwiseClone(Boolean)
Creates a shallow copy of the current MarshalByRefObject object.
(Inherited from MarshalByRefObject.)
MemberwiseClone()()()
Creates a shallow copy of the current Object.
(Inherited from Object.)
Parent
The parent of the element.

PreferredCapability
The preferred capability of the element.

Role
The role of the element (= main capability).

ScreenLocation
The location of the element in screen coordinates.

ScreenRectangle
The bounding rectangle of the element in screen coordinates.

SetAttributeValue(String, Object)
Sets the value of an attribute.

SetAttributeValue(String, String)
Sets the value of an attribute.

Size
The (x,y) size of element.

SubscribeEvent(String, Delegate)
Subscribes to an event.

ToString()()()
Returns a String that represents the current Object.
(Overrides Object.ToString()()().)
TryFindSingle(RxPath, Element%)
Tries to apply a Ranorex Path to the element.

TryFindSingle(RxPath, Duration, Element%)
Tries to apply a Ranorex Path to the element.

UnsubscribeEvent(String, Delegate)
Unsubscribes from an event.

Valid
Returns true if the element is believed to be valid.

Visible
True if the element is visible.

Inheritance Hierarchy

Assembly: Ranorex.Core (Module: Ranorex.Core) Version: 4.0.3.22982 (4.0.3.22982)