New to Telerik Test StudioStart a free 30-day trial

Definition

Namespace:ArtOfTest.WebAii.DesktopAutomation

Assembly:ArtOfTest.WebAii.dll

Syntax:

C#
public class DesktopElement : ITargetElement

Inheritance: objectDesktopElement

Implements: ITargetElement

Fields

C#
protected DesktopFind find

nativeElement

IUIAutomationElement

C#
protected IUIAutomationElement nativeElement

Properties

C#
public virtual string AutomationId { get; }
C#
public virtual string ClassName { get; }
C#
public virtual int ControlType { get; }
C#
public string ControlTypeName { get; }
C#
public DesktopFind Find { get; }
C#
public virtual string FrameworkId { get; }
C#
public virtual bool HasKeyboardFocus { get; }
C#
public virtual string HelpText { get; }
C#
public IAutomationHost Host { get; }
C#
public virtual bool IsEnabled { get; }
C#
public virtual bool IsKeyboardFocusable { get; }
C#
public virtual bool IsOffscreen { get; }
C#
public virtual string LocalizedControlType { get; }
C#
public virtual string Name { get; }
C#
public virtual int ProcessId { get; }
C#
public virtual string RuntimeId { get; }

Methods

C#
public T As<T>() where T : DesktopControl
Returns:

T

C#
public Bitmap Capture()
Returns:

Bitmap

C#
public T CastIncludingAncestors<T>(int depth = 5) where T : DesktopControl
Parameters:depthintReturns:

T

C#
public bool Exists()
Returns:

bool

C#
public static DesktopElement FromDesktopRoot()
Returns:

DesktopElement

C#
public static DesktopElement FromScreenCoordinates(int x, int y)
Parameters:xintyintReturns:

DesktopElement

C#
public static DesktopElement FromWindowHandle(IntPtr handle)
Parameters:handleIntPtrReturns:

DesktopElement

C#
public virtual IEnumerable<DesktopElement> GetChildren()
Returns:

IEnumerable<DesktopElement>

C#
public virtual DesktopElement GetNextSibling()
Returns:

DesktopElement

C#
public virtual DesktopElement GetParent()
Returns:

DesktopElement

C#
public virtual DesktopElement GetPreviousSibling()
Returns:

DesktopElement

C#
public Rectangle GetScreenRectangle()
Returns:

Rectangle

C#
public virtual bool IsVisible()
Returns:

bool

C#
public bool PointsToSameAs(DesktopElement element)
Parameters:elementDesktopElementReturns:

bool

C#
public void ScrollToVisible(ScrollOption scrollOption)
Parameters:scrollOptionScrollOption
C#
public void SetFocus()
C#
public bool WaitFor(Func<bool> predicate, int delay = 500, int timeout = 2500)
Parameters:predicateFunc<bool>delayinttimeoutintReturns:

bool

C#
public bool WaitForNoMotion(int checkInterval = 500, int timeout = 2500)
Parameters:checkIntervalinttimeoutintReturns:

bool