skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • NEW: Design Kits for Figma
    • Online Training
    • Document Processing Library
    • Embedded Reporting for web and desktop
    Web
    Kendo UI UI for jQuery UI for Angular UI for React UI for Vue UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX
    Mobile
    UI for .NET MAUI UI for Xamarin
    Document Management
    Telerik Document Processing
    Desktop
    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF
    Reporting & Mocking
    Telerik Reporting Telerik Report Server Telerik JustMock
    Automated Testing
    Test Studio Test Studio Dev Edition
    CMS
    Sitefinity
    UI/UX Tools
    ThemeBuilder Design System Kit
    Debugging
    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Jam FiddlerCap FiddlerCore
    Free Tools
    VB.NET to C# Converter Testing Framework
    View all products
  • Overview
    • Functional UI Testing
    • RESTful API Testing
    • Load Testing
    • Remote Test Execution
    • Agile Teams
    • Web Test Automation
    • Desktop Test Automation
    • Responsive UI Testing
    • Continuous Testing
    • Test Studio Trainings
    • Test Studio Consulting
    • Docs and Support
    • Documentation
    • Virtual Classroom
    • Videos
    • Blogs
    • Webinars
    • Whitepapers
    • Case Studies
    • Feedback Portal
    • Technical Support
    • What’s New
    • Roadmap
    • Release Notes
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Request a demo Try now

Class Element

Inheritance
System.Object
Element
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: ArtOfTest.WebAii.ObjectModel
Assembly: ArtOfTest.WebAii.dll

Syntax

public class Element : ITargetElement

Constructors

Element(HtmlFindExpression, Find, Browser)

Declaration
public Element(HtmlFindExpression findExpr, Find findObj, Browser ownerBrowser)
Parameters
HtmlFindExpression findExpr

Find findObj

Browser ownerBrowser

Properties

AbsoluteSiblingTagIndex

Declaration
public int AbsoluteSiblingTagIndex { get; set; }
Property Value
System.Int32

AbsoluteTagIndex

Declaration
public int AbsoluteTagIndex { get; }
Property Value
System.Int32

Attributes

Declaration
public ReadOnlyCollection<iAttribute> Attributes { get; }
Property Value
System.Collections.ObjectModel.ReadOnlyCollection<iAttribute>

ChildNodes

Declaration
public ReadOnlyCollection<Element> ChildNodes { get; }
Property Value
System.Collections.ObjectModel.ReadOnlyCollection<Element>

Children

Declaration
public ReadOnlyCollection<Element> Children { get; }
Property Value
System.Collections.ObjectModel.ReadOnlyCollection<Element>

Content

Declaration
public string Content { get; }
Property Value
System.String

CssClassAttributeValue

Declaration
public string CssClassAttributeValue { get; }
Property Value
System.String

Data

Declaration
public object Data { get; set; }
Property Value
System.Object

Depth

Declaration
public int Depth { get; }
Property Value
System.Int32

Implements
ITargetElement.Depth

ElementType

Declaration
public ElementType ElementType { get; }
Property Value
ElementType

FindExpressionUsed

Declaration
public HtmlFindExpression FindExpressionUsed { get; }
Property Value
HtmlFindExpression

FindObjectUsed

Declaration
public Find FindObjectUsed { get; }
Property Value
Find

FrameElement

Declaration
public Element FrameElement { get; set; }
Property Value
Element

HasIdOrName

Declaration
public bool HasIdOrName { get; }
Property Value
System.Boolean

Host

Declaration
public IAutomationHost Host { get; }
Property Value
IAutomationHost

Implements
ITargetElement.Host

IdAttributeValue

Declaration
public string IdAttributeValue { get; }
Property Value
System.String

InnerMarkup

Declaration
public string InnerMarkup { get; }
Property Value
System.String

InnerText

Declaration
public string InnerText { get; }
Property Value
System.String

InputElementType

Declaration
public InputElementType InputElementType { get; }
Property Value
InputElementType

IsBeginTag

Declaration
public bool IsBeginTag { get; }
Property Value
System.Boolean

IsEndTag

Declaration
public bool IsEndTag { get; }
Property Value
System.Boolean

IsProxy

Declaration
public bool IsProxy { get; }
Property Value
System.Boolean

IsSelfClosing

Declaration
public bool IsSelfClosing { get; }
Property Value
System.Boolean

IsTestRegion

Declaration
public bool IsTestRegion { get; }
Property Value
System.Boolean

Implements
ITargetElement.IsTestRegion

MatchingClosingTag

Declaration
public Element MatchingClosingTag { get; set; }
Property Value
Element

NameAttributeValue

Declaration
public string NameAttributeValue { get; }
Property Value
System.String

OuterMarkup

Declaration
public string OuterMarkup { get; }
Property Value
System.String

OwnerBrowser

Declaration
public Browser OwnerBrowser { get; }
Property Value
Browser

Parent

Declaration
public Element Parent { get; }
Property Value
Element

ParsedElement

Declaration
public ParsedElement ParsedElement { get; }
Property Value
ParsedElement

Implements
ITargetElement.ParsedElement

ParsingType

Declaration
public ParsedElementType ParsingType { get; }
Property Value
ParsedElementType

TagName

Declaration
public string TagName { get; }
Property Value
System.String

TagNameIndex

Declaration
public int TagNameIndex { get; }
Property Value
System.Int32

TechnologyType

Declaration
public TechnologyType TechnologyType { get; }
Property Value
TechnologyType

Implements
ITargetElement.TechnologyType

TextContent

Declaration
public string TextContent { get; }
Property Value
System.String

Wait

Declaration
public Wait Wait { get; }
Property Value
Wait

Methods

AddChild(Element)

Declaration
public virtual void AddChild(Element child)
Parameters
Element child

AddChildNode(ITargetElement)

Declaration
public void AddChildNode(ITargetElement element)
Parameters
ITargetElement element

Implements
ITargetElement.AddChildNode(ITargetElement)

As<TControl>()

Declaration
public TControl As<TControl>()
    where TControl : Control, new()
Returns
TControl

Type Parameters
TControl

Capture()

Declaration
public Bitmap Capture()
Returns
System.Drawing.Bitmap

Implements
ITargetElement.Capture()

CaptureImage()

Declaration
public ElementImage CaptureImage()
Returns
ElementImage

Implements
ITargetElement.CaptureImage()

CastIncludingAncestors<TControl>(Int32)

Declaration
public TControl CastIncludingAncestors<TControl>(int depth = 5)
    where TControl : Control, new()
Parameters
System.Int32 depth

Returns
TControl

Type Parameters
TControl

ContainsAttribute(iAttribute, Boolean, StringComparison, Boolean)

Declaration
public bool ContainsAttribute(iAttribute attribute, bool usePartialAttributeValue, StringComparison comparison, bool matchQuotes)
Parameters
iAttribute attribute

System.Boolean usePartialAttributeValue

System.StringComparison comparison

System.Boolean matchQuotes

Returns
System.Boolean

ContainsAttribute(String)

Declaration
public bool ContainsAttribute(string attributeName)
Parameters
System.String attributeName

Returns
System.Boolean

CreateLight(String, Int32)

Declaration
public static Element CreateLight(string tagName, int tagIndex)
Parameters
System.String tagName

System.Int32 tagIndex

Returns
Element

Equals(Object)

Declaration
public override bool Equals(object obj)
Parameters
System.Object obj

Returns
System.Boolean

Overrides
System.Object.Equals(System.Object)

Focus()

Declaration
public void Focus()

FriendlyName()

Declaration
public string FriendlyName()
Returns
System.String

GetAttribute(String)

Declaration
public iAttribute GetAttribute(string name)
Parameters
System.String name

Returns
iAttribute

GetAttribute(String, Boolean)

Declaration
public iAttribute GetAttribute(string name, bool ignoreCase)
Parameters
System.String name

System.Boolean ignoreCase

Returns
iAttribute

GetAttributeValueOrEmpty(String)

Declaration
public string GetAttributeValueOrEmpty(string attrName)
Parameters
System.String attrName

Returns
System.String

GetChildren()

Declaration
public ITargetElement[] GetChildren()
Returns
ITargetElement[]

Implements
ITargetElement.GetChildren()

GetHashCode()

Declaration
public override int GetHashCode()
Returns
System.Int32

Overrides
System.Object.GetHashCode()

GetHostParent()

Declaration
public ITargetElement GetHostParent()
Returns
ITargetElement

Implements
ITargetElement.GetHostParent()

GetNextSibling()

Declaration
public Element GetNextSibling()
Returns
Element

GetParent()

Declaration
public ITargetElement GetParent()
Returns
ITargetElement

Implements
ITargetElement.GetParent()

GetPreservedInnerText(Boolean)

Declaration
public string GetPreservedInnerText(bool trimStartEnd)
Parameters
System.Boolean trimStartEnd

Returns
System.String

GetPreviousSibling()

Declaration
public Element GetPreviousSibling()
Returns
Element

GetRectangle()

Declaration
public virtual Rectangle GetRectangle()
Returns
System.Drawing.Rectangle

Implements
ITargetElement.GetRectangle()

GetStringPresentation()

Declaration
public string GetStringPresentation()
Returns
System.String

Implements
ITargetElement.GetStringPresentation()

GetTextContentRecursive(String[])

Declaration
public string GetTextContentRecursive(params string[] tags)
Parameters
System.String[] tags

Returns
System.String

GetUniqueHashCode()

Declaration
public int GetUniqueHashCode()
Returns
System.Int32

Implements
ITargetElement.GetUniqueHashCode()

GetValue<T>(String)

Declaration
public virtual T GetValue<T>(string propertyName)
Parameters
System.String propertyName

Returns
T

Type Parameters
T

GetValue<T>(String, T)

Declaration
public virtual T GetValue<T>(string propertyName, T defaultValue)
Parameters
System.String propertyName

T defaultValue

Returns
T

Type Parameters
T

GetValue<T>(String, Boolean)

Declaration
[Obsolete]
public virtual T GetValue<T>(string propertyName, bool isJsWrappedObject)
Parameters
System.String propertyName

System.Boolean isJsWrappedObject

Returns
T

Type Parameters
T

GetValue<T>(String, Boolean, T)

Declaration
[Obsolete]
public virtual T GetValue<T>(string propertyName, bool isJsWrappedObject, T defaultValue)
Parameters
System.String propertyName

System.Boolean isJsWrappedObject

T defaultValue

Returns
T

Type Parameters
T

IsFrame()

Declaration
public FrameInfo IsFrame()
Returns
FrameInfo

IsFrame(Boolean, Boolean)

Declaration
public FrameInfo IsFrame(bool makeAbsolute, bool stripFinalBrowserSegment = false)
Parameters
System.Boolean makeAbsolute

System.Boolean stripFinalBrowserSegment

Returns
FrameInfo

Match(IFindExpression)

Declaration
public bool Match(IFindExpression findExpr)
Parameters
IFindExpression findExpr

Returns
System.Boolean

Implements
ITargetElement.Match(IFindExpression)

Refresh()

Declaration
public virtual void Refresh()
Implements
ITargetElement.Refresh()

Refresh(Boolean)

Declaration
public virtual void Refresh(bool forceDomTreeRefresh)
Parameters
System.Boolean forceDomTreeRefresh

SetClosingTag(ITargetElement)

Declaration
public void SetClosingTag(ITargetElement closingElement)
Parameters
ITargetElement closingElement

Implements
ITargetElement.SetClosingTag(ITargetElement)

SetDepth(Int32)

Declaration
public void SetDepth(int depth)
Parameters
System.Int32 depth

Implements
ITargetElement.SetDepth(Int32)

SetParent(ITargetElement)

Declaration
public void SetParent(ITargetElement parent)
Parameters
ITargetElement parent

Implements
ITargetElement.SetParent(ITargetElement)

SetValue<T>(String, T)

Declaration
public virtual void SetValue<T>(string propertyName, T value)
Parameters
System.String propertyName

T value

Type Parameters
T

SetValue<T>(String, T, Boolean)

Declaration
public virtual void SetValue<T>(string propertyName, T value, bool isJsWrappedObject)
Parameters
System.String propertyName

T value

System.Boolean isJsWrappedObject

Type Parameters
T

ToString()

Declaration
public override string ToString()
Returns
System.String

Overrides
System.Object.ToString()

Extension Methods

SilverlightAppFinder.IsSilverlightPlugin(Element)
jQueryExtension.TojQuery(Element)
Getting Started
  • Getting Started
  • Videos
  • Whats New
  • Roadmap
Community
  • Forums
  • Blogs
  • Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.