ClassDesktopControl
Base class for desktop controls.
Definition
Namespace:ArtOfTest.WebAii.DesktopAutomation.Controls
Assembly:ArtOfTest.WebAii.dll
Syntax:
public class DesktopControl
Inheritance: objectDesktopControl
Derived Classes:
Constructors
Fields
element
Underlying desktop element.
Properties
Element
Underlying desktop element.
Find
Find object. Use to search desktop elements by specific properties.
User
Gets the UI interaction object that allows you to interact with this DesktopControl directly using real mouse and keyboard interactions
Declaration
[Browsable(false)]
public virtual UserInteraction User { get; }
Property Value
Methods
CreateOrNull<T>(Func<T>)
Invoke creator function. If it fails return null.
Declaration
protected T CreateOrNull<T>(Func<T> creator)
Parameters
creator
Func<T>
Creator function.
Returns
T
Instance of T.
Exists()
Verify underlying element still exists.
Declaration
public bool Exists()
Returns
True if element exists, otherwise false.
InitControl(DesktopElement)
Initialize desktop control.
Declaration
protected virtual void InitControl(DesktopElement element)
Parameters
element
Underlying element.
PointsToSameAs(DesktopControl)
Determine if two desktop control instances point to same UI component.
Declaration
public bool PointsToSameAs(DesktopControl control)
Parameters
control
The control to compare against.
Returns
True if both desktop controls point to same UI component, otherwise false.
ValidateControlType(int, string)
Validate underlying element control type.
ValidatePatternAvailable(int, string)
Validate whether pattern is available or not.
WaitFor(Func<bool>, int, int)
Wait for predicate to become true or timeout to occur.
Declaration
public bool WaitFor(Func<bool> predicate, int delay = 500, int timeout = 2500)
Parameters
predicate
Predicate to wait for.
delay
Delay in milliseconds before invoking the predicate.
timeout
Operation timeout in milliseconds.
Returns
True if predicate was true within timeout interval, otherwise false.
WaitForNoMotion(int, int)
Wait for control to be stationary.