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 DesktopElement

Inheritance
System.Object
DesktopElement
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: ArtOfTest.WebAii.DesktopAutomation
Assembly: ArtOfTest.WebAii.dll

Syntax

public class DesktopElement : ITargetElement

Fields

find

Declaration
protected DesktopFind find
Field Value
DesktopFind

nativeElement

Declaration
protected IUIAutomationElement nativeElement
Field Value
Interop.UIAutomationClient.IUIAutomationElement

Properties

AutomationId

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

ClassName

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

ControlType

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

ControlTypeName

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

Find

Declaration
public DesktopFind Find { get; }
Property Value
DesktopFind

FrameworkId

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

HasKeyboardFocus

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

HelpText

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

Host

Declaration
public IAutomationHost Host { get; }
Property Value
IAutomationHost

IsEnabled

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

IsKeyboardFocusable

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

IsOffscreen

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

LocalizedControlType

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

Name

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

ProcessId

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

RuntimeId

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

Methods

As<T>()

Declaration
public T As<T>()
    where T : DesktopControl
Returns
T

Type Parameters
T

Capture()

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

CastIncludingAncestors<T>(Int32)

Declaration
public T CastIncludingAncestors<T>(int depth = 5)
    where T : DesktopControl
Parameters
System.Int32 depth

Returns
T

Type Parameters
T

Exists()

Declaration
public bool Exists()
Returns
System.Boolean

FromDesktopRoot()

Declaration
public static DesktopElement FromDesktopRoot()
Returns
DesktopElement

FromScreenCoordinates(Int32, Int32)

Declaration
public static DesktopElement FromScreenCoordinates(int x, int y)
Parameters
System.Int32 x

System.Int32 y

Returns
DesktopElement

FromWindowHandle(IntPtr)

Declaration
public static DesktopElement FromWindowHandle(IntPtr handle)
Parameters
System.IntPtr handle

Returns
DesktopElement

GetChildren()

Declaration
public virtual IEnumerable<DesktopElement> GetChildren()
Returns
System.Collections.Generic.IEnumerable<DesktopElement>

GetNextSibling()

Declaration
public virtual DesktopElement GetNextSibling()
Returns
DesktopElement

GetParent()

Declaration
public virtual DesktopElement GetParent()
Returns
DesktopElement

GetPreviousSibling()

Declaration
public virtual DesktopElement GetPreviousSibling()
Returns
DesktopElement

GetScreenRectangle()

Declaration
public Rectangle GetScreenRectangle()
Returns
System.Drawing.Rectangle

IsVisible()

Declaration
public virtual bool IsVisible()
Returns
System.Boolean

PointsToSameAs(DesktopElement)

Declaration
public bool PointsToSameAs(DesktopElement element)
Parameters
DesktopElement element

Returns
System.Boolean

ScrollToVisible(ScrollOption)

Declaration
public void ScrollToVisible(ScrollOption scrollOption)
Parameters
ScrollOption scrollOption

SetFocus()

Declaration
public void SetFocus()

WaitFor(Func<Boolean>, Int32, Int32)

Declaration
public bool WaitFor(Func<bool> predicate, int delay = 500, int timeout = 2500)
Parameters
System.Func<System.Boolean> predicate

System.Int32 delay

System.Int32 timeout

Returns
System.Boolean

WaitForNoMotion(Int32, Int32)

Declaration
public bool WaitForNoMotion(int checkInterval = 500, int timeout = 2500)
Parameters
System.Int32 checkInterval

System.Int32 timeout

Returns
System.Boolean

Explicit Interface Implementations

ITargetElement.AddChildNode(ITargetElement)

Declaration
void ITargetElement.AddChildNode(ITargetElement child)
Parameters
ITargetElement child

Implements
ITargetElement.AddChildNode(ITargetElement)

ITargetElement.Capture()

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

Implements
ITargetElement.Capture()

ITargetElement.CaptureImage()

Declaration
ElementImage ITargetElement.CaptureImage()
Returns
ElementImage

Implements
ITargetElement.CaptureImage()

ITargetElement.Depth

Declaration
int ITargetElement.Depth { get; }
Returns
System.Int32

Implements
ITargetElement.Depth

ITargetElement.GetChildren()

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

Implements
ITargetElement.GetChildren()

ITargetElement.GetHostParent()

Declaration
ITargetElement ITargetElement.GetHostParent()
Returns
ITargetElement

Implements
ITargetElement.GetHostParent()

ITargetElement.GetParent()

Declaration
ITargetElement ITargetElement.GetParent()
Returns
ITargetElement

Implements
ITargetElement.GetParent()

ITargetElement.GetRectangle()

Declaration
Rectangle ITargetElement.GetRectangle()
Returns
System.Drawing.Rectangle

Implements
ITargetElement.GetRectangle()

ITargetElement.GetStringPresentation()

Declaration
string ITargetElement.GetStringPresentation()
Returns
System.String

Implements
ITargetElement.GetStringPresentation()

ITargetElement.GetUniqueHashCode()

Declaration
int ITargetElement.GetUniqueHashCode()
Returns
System.Int32

Implements
ITargetElement.GetUniqueHashCode()

ITargetElement.Host

Declaration
IAutomationHost ITargetElement.Host { get; }
Returns
IAutomationHost

Implements
ITargetElement.Host

ITargetElement.IsTestRegion

Declaration
bool ITargetElement.IsTestRegion { get; }
Returns
System.Boolean

Implements
ITargetElement.IsTestRegion

ITargetElement.Match(IFindExpression)

Declaration
bool ITargetElement.Match(IFindExpression findExpr)
Parameters
IFindExpression findExpr

Returns
System.Boolean

Implements
ITargetElement.Match(IFindExpression)

ITargetElement.ParsedElement

Declaration
ParsedElement ITargetElement.ParsedElement { get; }
Returns
ParsedElement

Implements
ITargetElement.ParsedElement

ITargetElement.Refresh()

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

ITargetElement.SetClosingTag(ITargetElement)

Declaration
void ITargetElement.SetClosingTag(ITargetElement closingElement)
Parameters
ITargetElement closingElement

Implements
ITargetElement.SetClosingTag(ITargetElement)

ITargetElement.SetDepth(Int32)

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

Implements
ITargetElement.SetDepth(Int32)

ITargetElement.SetParent(ITargetElement)

Declaration
void ITargetElement.SetParent(ITargetElement parent)
Parameters
ITargetElement parent

Implements
ITargetElement.SetParent(ITargetElement)

ITargetElement.TechnologyType

Declaration
TechnologyType ITargetElement.TechnologyType { get; }
Returns
TechnologyType

Implements
ITargetElement.TechnologyType
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.