ClassDesktopApplication
Represents desktop application.
Definition
Namespace:ArtOfTest.WebAii.DesktopAutomation
Assembly:ArtOfTest.WebAii.dll
Syntax:
public class DesktopApplication
Inheritance: objectDesktopApplication
Properties
MainWindow
Get desktop object referencing application main window.
Declaration
public DesktopApplicationWindow MainWindow { get; }
Property Value
Instance of DesktopApplicationWindow.
Manager
Reference to manager.
Popups
Get application popups.
Declaration
public DesktopApplicationPopup[] Popups { get; }
Property Value
Process
Get process of desktop application.
QuitOnDetach
Whether to close application when the testing framework detaches from the application.
Windows
Get desktop windows in application.
Declaration
public DesktopApplicationWindow[] Windows { get; }
Property Value
Methods
Detach(bool)
Detach from underlying application.
Declaration
public void Detach(bool quitOnDetach)
Parameters
quitOnDetach
Indicates whether application should be closed or not. Set to true to close.
Refresh(int)
Check whether application has changed its state and update MainWindow and Windows.
Declaration
public void Refresh(int depth = 2)
Parameters
depth
Indicates max level we need to search UI tree to find process related element.
WaitForPopup(string, int, int)
Wait for popup with particular class name and control type to appear.
Declaration
public DesktopApplicationPopup WaitForPopup(string className, int delay = 500, int timeout = 15000)
Parameters
className
Popup class name.
delay
Delay between retries.
timeout
Maximum time in milliseconds to wait.
Returns
Instance of DesktopApplicationPopup.
Exceptions
Throws TimeoutException if the Popup is not found during the allotted time.
WaitForWindow(string, int, int)
Wait for window with particular name to appear.
Declaration
public DesktopApplicationWindow WaitForWindow(string name, int delay = 500, int timeout = 15000)
Parameters
name
Window name.
delay
Delay between retries.
timeout
Maximum time in milliseconds to wait.
Returns
Instance of DesktopApplicationWindow.
Exceptions
Throws TimeoutException if the Window is not found during the allotted time.