Element Class

Progress Software Corporation - Testing Framework 2018.1 Automation Infrastructure
Represents an element in the Document Object Model (DOM) tree.
Inheritance Hierarchy

SystemObject
  ArtOfTest.WebAii.ObjectModelElement

Namespace:  ArtOfTest.WebAii.ObjectModel
Assembly:  ArtOfTest.WebAii (in ArtOfTest.WebAii.dll) Version: 2018.1.116.0 (2018.1.116.0)
Syntax

public class Element : ITargetElement

The Element type exposes the following members.

Constructors

  NameDescription
Public methodElement
Initialize an element proxy. The only property off this element that you can use is Wait.Exist() or Wait.ExistsNot()
Top
Properties

  NameDescription
Public propertyAbsoluteSiblingTagIndex
Gets the absolute sibling tag index of this element within the parent node. Basically the order of this node among its siblings. Zero-based.
Public propertyAbsoluteTagIndex
Gets the absolute that index of this element. This index is unique within a document.
Public propertyAttributes
Gets the list of attributes defined for this element.
Public propertyChildNodes
Gets the list of all parsed element of this tag including text literals, comments, malformed tags...etc.
Public propertyChildren
Gets the list of child elements that are well formed markup non-text elements.
Public propertyCode exampleContent
Gets the raw content of the tag that represents this element.
Examples

The following tag <foo id="bar" height="px">some text</foo> , has a Content property that is: '<foo id="bar" height="px">' Note: this does not include the innerText or the closing tag.
Public propertyCssClassAttributeValue
Gets the value of the attribute ('class') if present on this tag.
Public propertyData
Gets/Sets any custom data associated with this element.
Public propertyDepth
Gets the hierarchical depth of this element
Public propertyElementType
Gets the element type (div, table ..etc).
Public propertyFindExpressionUsed
Gets the FindExpression used to find this element when using the Find object. This property is not set when calling the Find.Allxxx methods.
Public propertyFindObjectUsed
Gets a reference to the Find object used to find this element
Public propertyFrameElement
Gets / Sets the root frame element that this element is contained in.
Public propertyHasIdOrName
Gets whether this element has an id or a name set on it.
Public propertyHost
Get the IAutomationHost associated with this element.
Public propertyIdAttributeValue
Gets the value of the attribute ('id') if present on this tag.
Public propertyCode exampleInnerMarkup
Gets the InnerMarkup of this element.
Examples

Example: <foo id="1">hello<bar></bar></foo> If foo is this element then InnerMarkup=<bar></bar>
Public propertyCode exampleInnerText
Gets this element's inner text content including all of its nested children.
Examples

Example: <foo id="1">one<bar>two</bar></foo> If foo is this element then InnerText=onetwo
Public propertyInputElementType
Gets the Input type (i.e. checkbox, radio...etc) if the ElementType=Input. Otherwise, will return NotSet.
Public propertyIsBeginTag
Gets whether it is a begin tag <foo bar='me'> .
Public propertyIsEndTag
Gets whether this element is an end tag </foo>.
Public propertyIsProxy
Gets whether this element is a proxy element or a fully initialized element.
Public propertyIsSelfClosing
Gets whether the element is self-closing (<foo />).
Public propertyIsTestRegion
Gets whether the element is a test region or not. This function has been added for performance reasons. We don't want to call the ElementType property since it will trigger the full initialization of types.
Public propertyMatchingClosingTag
Gets the element's closing tag if it is a begin tag and not self-closing.
Public propertyNameAttributeValue
Gets the value of the attribute ('name') if present on this tag
Public propertyCode exampleOuterMarkup
Gets the OuterMarkup of this element.
Examples

Example: <foo id="1"><bar></bar></foo> If foo is this element then outerMarkup=<foo id="1"><bar></bar></foo>
Public propertyOwnerBrowser
Gets the owner browser of this element.
Public propertyParent
Gets the Parent element.
Public propertyParsedElement
Returns the raw parsed element.
Public propertyParsingType
Gets the parsing type set by the parser. (Markup, LiteralText, Comment..etc)
Public propertyTagName
Gets the tagName of the the element
Public propertyCode exampleTagNameIndex
Gets the tagName occurrence of this element.
Examples

If this element is TagName='foo', then TagNameIndex= 3 indicates that this element represents the third occurence of tagName 'foo' within this document.
Public propertyTechnologyType
Get the technology type.
Public propertyTextContent
Gets this element's inner text content without recursing through all its nested children for text.
Public propertyWait
Gets the wait object to wait for certain conditions of this element.
Top
Methods

  NameDescription
Public methodAddChild
Add a child element to this element.
Public methodAddChildNode
Add this node as a child node.
Public methodAsTControl
Returns this elements as a strongly-typed control of type TControl.
Public methodCapture
Public methodContainsAttribute(String)
True/False whether this element contains a specific attribute name.
Public methodContainsAttribute(iAttribute, Boolean, StringComparison, Boolean)
Whether a certain attribute is contained in this element
Public methodStatic memberCreateLight
Create an Element object with a specific tagname and index.
Public methodEquals
Defines how two Elements should be compared.
(Overrides ObjectEquals(Object).)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodFocus
Give this element keyboard focus
Public methodFriendlyName
Constructs a friendly name that represents this element.
Public methodGetAttribute(String)
Find a specific attribute by name and returns it. (case-insensitive)
Public methodGetAttribute(String, Boolean)
Finds a specific attribute name in the Element list of attributes and returns its object
Public methodGetAttributeValueOrEmpty
Gets the value of the attribute or a String.Empty if attribute does not exist.
Public methodGetChildren
Get the children of this node.
Public methodGetHashCode
Get the hash code for this Element.
(Overrides ObjectGetHashCode.)
Public methodGetHostParent
Returns the FRAME or IFRAME element containing this element's document, if one exists.
Public methodGetNextSibling
Get the next sibling of this node. If this node is the last sibling, will return null.
Public methodGetParent
Get the parent of this node.
Public methodGetPreservedInnerText
Same as InnerText but will respect any whitespaces between the tags.
Public methodGetPreviousSibling
Get the previous sibiling of this node. If this node is the first sibling, will return null.
Public methodGetRectangle
Gets the element rectangle. (X,Y) and width, height as it appears on browser and screen. Takes into account any scrolling.
Public methodGetStringPresentation
Public methodGetTextContentRecursive
Gets the text content of this element, recursing only into the listed tags
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGetUniqueHashCode
Calculates the hash code for this element.
Public methodGetValueT(String)
Get a property value on this element.
Public methodGetValueT(String, Boolean)
Get a property value on this element.
Public methodGetValueT(String, T)
Get a property value on this element.
Public methodGetValueT(String, Boolean, T)
Get a property value on this element.
Public methodIsFrame
Gets whether this element represents an iframe or frame
Public methodIsFrame(Boolean, Boolean)
Gets whether this element represents an iframe or frame
Public methodMatch
Match this expression against element.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodRefresh
Using the FindParamsUsed and the TestRegionIdUsed to find this element last, this methods will attempt to re-find this element in the new DOM tree.
Public methodRefresh(Boolean)
Using the FindParamsUsed and the TestRegionIdUsed to find this element last, this methods will attempt to re-find this element in the new DOM tree.
Public methodSetClosingTag
Set the matching closing tag.
Public methodSetDepth
Sets the hierarchical depth of this element.
Public methodSetParent
Sets the parent of this Element.
Public methodSetValueT(String, T)
Set a property to a value on this element.
Public methodSetValueT(String, T, Boolean)
Set a property to a value on this element.
Public methodToString
String representation of an Element.
(Overrides ObjectToString.)
Top
Extension Methods

  NameDescription
Public Extension MethodIsSilverlightPlugin
Detects whether the element is an object tag hosting a Silverlight plugin
(Defined by SilverlightAppFinder.)
Public Extension MethodTojQuery
Start a jQuery expression from this element.
(Defined by jQueryExtension.)
Top
See Also

Reference