ClassDesktopApplicationWindow
Represents a window in a desktop application
Definition
Namespace:ArtOfTest.WebAii.DesktopAutomation
Assembly:ArtOfTest.WebAii.dll
Syntax:
public class DesktopApplicationWindow : IDesktopAutomationHost, IAutomationHost, ISupportSearchHost, IAnnotationHost
Inheritance: objectDesktopApplicationWindow
Implements:
Properties
CanMaximize
Indicates whether window can be maximized or not.
CanMinimize
Indicates whether window can be minimized or not.
CanMove
Indicates whether window can be moved or not.
CanResize
Indicates whether window can be resized or not.
CreationDate
The moment when current object was created.
Element
Get root desktop element.
Find
Find object. Use to search desktop elements by specific properties.
Declaration
public DesktopFind Find { get; }
Property Value
Implements
Handle
Native handle of the window.
IsMaximized
Indicates whether window is maximized.
IsMinimized
Indicates whether window is minimized.
IsModal
Indicates whether window is modal or not.
IsTopmost
Indicates whether window is topmost or not.
Name
Name of the window.
NativeWindow
Desktop application native window.
Methods
Capture()
Capture image of window.
Declaration
public Bitmap Capture()
Returns
Bitmap object containing window image
GetScreenRectangle()
Get window bounds rectangle.
Declaration
public Rectangle GetScreenRectangle()
Returns
Rectangle object using screen coordinates.
Move(double, double)
Move window to specific coordinates.
Resize(double, double)
Resize window to new width and height.
WaitForInputIdle(int)
Wait for window input to get into idle state.
Declaration
public void WaitForInputIdle(int timeout)
Parameters
timeout
Timeout in milliseconds.
WaitForWindowInteractionState(WindowInteractionState, int, int)
Wait for window interaction state to match a particular value.
Declaration
public bool WaitForWindowInteractionState(WindowInteractionState state, int delay = 100, int timeout = 300)
Parameters
state
Window interaction state value to wait for.
delay
Delay between checks in milliseconds.
timeout
Max time to wait in milliseconds.
Returns
True if window interaction state matches expected value into timeout interval, otherwise false.
WaitForWindowVisualState(WindowVisualState, int, int)
Wait for window visual state to match a particular value.
Declaration
public bool WaitForWindowVisualState(WindowVisualState state, int delay = 100, int timeout = 300)
Parameters
state
Window visual state value to wait for.
delay
Delay between checks in milliseconds.
timeout
Max time to wait in milliseconds.
Returns
True if window visual state matches expected value into timeout interval, otherwise false.