Represents an element in the Document Object Model (DOM) tree.
Inheritance Hierarchy
ArtOfTest.WebAii.ObjectModelElement
Namespace: ArtOfTest.WebAii.ObjectModel
Assembly: ArtOfTest.WebAii (in ArtOfTest.WebAii.dll) Version: 2018.1.116.0 (2018.1.116.0)
Syntax
The Element type exposes the following members.
Constructors
Name | Description | |
---|---|---|
Element |
Initialize an element proxy.
The only property off this element that you can use is Wait.Exist() or Wait.ExistsNot()
|
Properties
Name | Description | |
---|---|---|
AbsoluteSiblingTagIndex |
Gets the absolute sibling tag index of this element within the parent node.
Basically the order of this node among its siblings. Zero-based.
| |
AbsoluteTagIndex |
Gets the absolute that index of this element. This index is unique within a document.
| |
Attributes |
Gets the list of attributes defined for this element.
| |
ChildNodes |
Gets the list of all parsed element of this tag including text literals, comments, malformed tags...etc.
| |
Children |
Gets the list of child elements that are well formed markup non-text elements.
| |
Content |
Gets the raw content of the tag that represents this element.
Examples | |
CssClassAttributeValue |
Gets the value of the attribute ('class') if present on this tag.
| |
Data |
Gets/Sets any custom data associated with this element.
| |
Depth |
Gets the hierarchical depth of this element
| |
ElementType |
Gets the element type (div, table ..etc).
| |
FindExpressionUsed |
Gets the FindExpression used to find this element when using the Find object.
This property is not set when calling the Find.Allxxx methods.
| |
FindObjectUsed |
Gets a reference to the Find object used to find this element
| |
FrameElement |
Gets / Sets the root frame element that this element is contained in.
| |
HasIdOrName |
Gets whether this element has an id or a name set on it.
| |
Host |
Get the IAutomationHost associated with this element.
| |
IdAttributeValue |
Gets the value of the attribute ('id') if present on this tag.
| |
InnerMarkup |
Gets the InnerMarkup of this element.
Examples | |
InnerText |
Gets this element's inner text content including all of its nested children.
Examples | |
InputElementType |
Gets the Input type (i.e. checkbox, radio...etc) if the ElementType=Input.
Otherwise, will return NotSet.
| |
IsBeginTag |
Gets whether it is a begin tag <foo bar='me'> .
| |
IsEndTag |
Gets whether this element is an end tag </foo>.
| |
IsProxy |
Gets whether this element is a proxy element or a fully initialized element.
| |
IsSelfClosing |
Gets whether the element is self-closing (<foo />).
| |
IsTestRegion |
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.
| |
MatchingClosingTag |
Gets the element's closing tag if it is a begin tag and not self-closing.
| |
NameAttributeValue |
Gets the value of the attribute ('name') if present on this tag
| |
OuterMarkup |
Gets the OuterMarkup of this element.
Examples | |
OwnerBrowser |
Gets the owner browser of this element.
| |
Parent |
Gets the Parent element.
| |
ParsedElement |
Returns the raw parsed element.
| |
ParsingType |
Gets the parsing type set by the parser. (Markup, LiteralText, Comment..etc)
| |
TagName |
Gets the tagName of the the element
| |
TagNameIndex |
Gets the tagName occurrence of this element.
Examples | |
TechnologyType |
Get the technology type.
| |
TextContent |
Gets this element's inner text content without recursing through all its nested children for text.
| |
Wait |
Gets the wait object to wait for certain conditions of this element.
|
Methods
Name | Description | |
---|---|---|
AddChild |
Add a child element to this element.
| |
AddChildNode |
Add this node as a child node.
| |
AsTControl |
Returns this elements as a strongly-typed control of type TControl.
| |
Capture | ||
ContainsAttribute(String) |
True/False whether this element contains a specific attribute name.
| |
ContainsAttribute(iAttribute, Boolean, StringComparison, Boolean) |
Whether a certain attribute is contained in this element
| |
CreateLight |
Create an Element object with a specific tagname and index.
| |
Equals |
Defines how two Elements should be compared.
(Overrides ObjectEquals(Object).) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
Focus |
Give this element keyboard focus
| |
FriendlyName |
Constructs a friendly name that represents this element.
| |
GetAttribute(String) |
Find a specific attribute by name and returns it. (case-insensitive)
| |
GetAttribute(String, Boolean) |
Finds a specific attribute name in the Element list of attributes and returns
its object
| |
GetAttributeValueOrEmpty |
Gets the value of the attribute or a String.Empty if attribute does not exist.
| |
GetChildren |
Get the children of this node.
| |
GetHashCode |
Get the hash code for this Element.
(Overrides ObjectGetHashCode.) | |
GetHostParent |
Returns the FRAME or IFRAME element containing this element's document, if one exists.
| |
GetNextSibling |
Get the next sibling of this node. If this node is the last sibling, will return null.
| |
GetParent |
Get the parent of this node.
| |
GetPreservedInnerText |
Same as InnerText but will respect any whitespaces between the
tags.
| |
GetPreviousSibling |
Get the previous sibiling of this node. If this node is the first sibling, will return null.
| |
GetRectangle |
Gets the element rectangle. (X,Y) and width, height as it appears on browser and screen.
Takes into account any scrolling.
| |
GetStringPresentation | ||
GetTextContentRecursive |
Gets the text content of this element, recursing only into the listed tags
| |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
GetUniqueHashCode |
Calculates the hash code for this element.
| |
GetValueT(String) |
Get a property value on this element.
| |
GetValueT(String, Boolean) |
Get a property value on this element.
| |
GetValueT(String, T) |
Get a property value on this element.
| |
GetValueT(String, Boolean, T) |
Get a property value on this element.
| |
IsFrame |
Gets whether this element represents an iframe or frame
| |
IsFrame(Boolean, Boolean) |
Gets whether this element represents an iframe or frame
| |
Match |
Match this expression against element.
| |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
Refresh |
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.
| |
Refresh(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.
| |
SetClosingTag |
Set the matching closing tag.
| |
SetDepth |
Sets the hierarchical depth of this element.
| |
SetParent |
Sets the parent of this Element.
| |
SetValueT(String, T) |
Set a property to a value on this element.
| |
SetValueT(String, T, Boolean) |
Set a property to a value on this element.
| |
ToString |
String representation of an Element.
(Overrides ObjectToString.) |
Extension Methods
Name | Description | |
---|---|---|
IsSilverlightPlugin |
Detects whether the element is an object tag hosting
a Silverlight plugin
(Defined by SilverlightAppFinder.) | |
TojQuery |
Start a jQuery expression from this element.
(Defined by jQueryExtension.) |
See Also