Class
DesktopWindowPattern

Represent window pattern.

Definition

Namespace:ArtOfTest.WebAii.DesktopAutomation.Patterns

Assembly:ArtOfTest.WebAii.dll

Syntax:

cs-api-definition
public class DesktopWindowPattern : DesktopPattern

Inheritance: objectDesktopPatternDesktopWindowPattern

Inherited Members DesktopPattern.elementDesktopPattern.EnumNativeArray(IUIAutomationElementArray)DesktopPattern.GetNativePattern<T>(int)

Constructors

DesktopWindowPattern(DesktopElement)

Create new instance of DesktopWindowPattern class.

Declaration

cs-api-definition
public DesktopWindowPattern(DesktopElement element)

Parameters

element

DesktopElement

Underlying element.

Properties

CanMaximize

Indicates whether window can be maximized or not.

Declaration

cs-api-definition
public bool CanMaximize { get; }

Property Value

bool

CanMinimize

Indicates whether window can be minimized or not.

Declaration

cs-api-definition
public bool CanMinimize { get; }

Property Value

bool

IsMaximized

Indicates whether window is maximized.

Declaration

cs-api-definition
public bool IsMaximized { get; }

Property Value

bool

IsMinimized

Indicates whether window is minimized.

Declaration

cs-api-definition
public bool IsMinimized { get; }

Property Value

bool

IsModal

Indicates whether window is modal or not.

Declaration

cs-api-definition
public bool IsModal { get; }

Property Value

bool

IsTopmost

Indicates whether window is topmost or not.

Declaration

cs-api-definition
public bool IsTopmost { get; }

Property Value

bool

WindowInteractionState

Get window interaction state.

Declaration

cs-api-definition
public WindowInteractionState WindowInteractionState { get; }

Property Value

WindowInteractionState

WindowVisualState

Get window visual state.

Declaration

cs-api-definition
public WindowVisualState WindowVisualState { get; }

Property Value

WindowVisualState

Methods

Close()

Close window.

Declaration

cs-api-definition
public void Close()

Maximize()

Maximize window.

Declaration

cs-api-definition
public void Maximize()

Minimize()

Minimize window.

Declaration

cs-api-definition
public void Minimize()

Restore()

Restore window.

Declaration

cs-api-definition
public void Restore()

WaitForInputIdle(int)

Wait for window input to get into idle state.

Declaration

cs-api-definition
public void WaitForInputIdle(int timeout)

Parameters

timeout

int

Timeout in milliseconds.

WaitForWindowInteractionState(WindowInteractionState, int, int)

Wait for window interaction state to match a particular value.

Declaration

cs-api-definition
public bool WaitForWindowInteractionState(WindowInteractionState state, int delay, int timeout)

Parameters

state

WindowInteractionState

Window interaction state value to wait for.

delay

int

Delay between checks in milliseconds.

timeout

int

Max time to wait in milliseconds.

Returns

bool

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

cs-api-definition
public bool WaitForWindowVisualState(WindowVisualState state, int delay, int timeout)

Parameters

state

WindowVisualState

Window visual state value to wait for.

delay

int

Delay between checks in milliseconds.

timeout

int

Max time to wait in milliseconds.

Returns

bool

True if window visual state matches expected value into timeout interval, otherwise false.