Class
DialogMonitor

Class implementation for a dialog monitor to handle dialogs during execution.

Definition

Namespace:ArtOfTest.WebAii.Win32.Dialogs

Assembly:ArtOfTest.WebAii.dll

Syntax:

cs-api-definition
public class DialogMonitor

Inheritance: objectDialogMonitor

Constructors

DialogMonitor()

Create a new DialogMonitor object and start the monitoring.

Declaration

cs-api-definition
public DialogMonitor()

DialogMonitor(bool)

Create a new DialogMonitor object, associated with the current Manager

Declaration

cs-api-definition
public DialogMonitor(bool startMonitoring)

Parameters

startMonitoring

bool

Whether to start monitoring the dialogs. If false, monitoring can start by calling Start().

DialogMonitor(bool, Manager)

Create a new DialogMonitor object, associated with a specific Manager

Declaration

cs-api-definition
public DialogMonitor(bool startMonitoring, Manager manager)

Parameters

startMonitoring

bool

Whether to start monitoring the dialogs. If false, monitoring can start by calling Start().

manager

Manager

The manager to associate with the dialog monitor

Properties

Dialogs

Gets the collection of dialogs the monitor is monitoring.

Declaration

cs-api-definition
public ReadOnlyCollection<IDialog> Dialogs { get; }

Property Value

ReadOnlyCollection<IDialog>

IsMonitoring

Gets whether the DialogMonitor object is currently monitoring dialogs or not.

Declaration

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

Property Value

bool

Methods

AddDialog(IDialog)

Add a dialog to be monitored.

Declaration

cs-api-definition
public void AddDialog(IDialog dialog)

Parameters

dialog

IDialog

The dialog to add.

GetAllDialogs()

Returns a collection of all top level dialogs of the current desktop.

Declaration

cs-api-definition
public static WindowCollection GetAllDialogs()

Returns

WindowCollection

The collection of dialogs.

RemoveDialog(IDialog)

Remove a single dialog from the list of dialogs to monitor.

Declaration

cs-api-definition
public void RemoveDialog(IDialog dialog)

Parameters

dialog

IDialog

RemoveDialogs(params IDialog[])

Remove any number of dialogs from the list of dialogs to monitor.

Declaration

cs-api-definition
public void RemoveDialogs(params IDialog[] specifiedDialogsToRemove)

Parameters

specifiedDialogsToRemove

IDialog[]

The dialogs to remove. If empty, it will remove all of them.

Start()

Start dialog monitoring.

Declaration

cs-api-definition
public void Start()

Stop()

Stop dialog monitoring.

Declaration

cs-api-definition
public void Stop()

Events

UnexpectedDialogEvent

Declaration

cs-api-definition
public event EventHandler<WindowEventArgs> UnexpectedDialogEvent

Event Value

EventHandler<WindowEventArgs>