Class
GenericDialog

A generic dialog handler that can be used for quick and easy way to write a dialog handler for a simply dialog.

Definition

Namespace:ArtOfTest.WebAii.Win32.Dialogs

Assembly:ArtOfTest.WebAii.dll

Syntax:

cs-api-definition
public class GenericDialog : BaseDialog, IDialog

Inheritance: objectBaseDialogGenericDialog

Implements: IDialog

Inherited Members BaseDialog.m_browserVersionMajorBaseDialog.ValidatePid(int)BaseDialog.ValidateReadFileAccess(string, string, out string)BaseDialog.ValidatePaths(string, out string)BaseDialog.GetFilePaths(string)BaseDialog.SetDialogWindow(Window)BaseDialog.IsDialogActiveByTitle(WindowCollection, string)BaseDialog.IsDialogActiveByTitle(WindowCollection, string, bool)BaseDialog.IsRejectedViaRegexOrExactMatch(string, object)BaseDialog.IsDialogActiveByTitleAndTextContent(WindowCollection, string, bool, string)BaseDialog.ToString()BaseDialog.ResetHandleCount()BaseDialog.WaitUntilHandled(int)BaseDialog.WaitUntilHandled()BaseDialog.WaitUntilHandled(int, int, bool)BaseDialog.WaitUntilAnyHandled(IEnumerable<BaseDialog>, int, long, bool)BaseDialog.MatchesUIAutomationElement(AutomationElement)BaseDialog.OnBeforeHandle(EventArgs)BaseDialog.ParentBrowserBaseDialog.ErrorTextBaseDialog.CurrentStateBaseDialog.WindowBaseDialog.HandleCountBaseDialog.HandlerDelegateBaseDialog.DismissButtonBaseDialog.SkipHandlingBaseDialog.TagsBaseDialog.InitializationTimeBaseDialog.BeforeHandle

Constructors

GenericDialog(Browser, string, bool)

Create a new generic dialog.

Declaration

cs-api-definition
public GenericDialog(Browser parentBrowser, string title, bool partialTitle)

Parameters

parentBrowser

Browser

The parent browser.

title

string

The title of the dialog to handle.

partialTitle

bool

Whether the title provided is partial or complete.

Remarks

Will simply close this dialog.

GenericDialog(Browser, string, bool, int)

Create a new generic dialog

Declaration

cs-api-definition
public GenericDialog(Browser parentBrowser, string title, bool partialTitle, int buttonId)

Parameters

parentBrowser

Browser

The parent browser.

title

string

The title of the dialog.

partialTitle

bool

Whether the title provided is partial or complete.

buttonId

int

The button id to click on the dialog.

GenericDialog(Browser, string, bool, int, string)

Create a new generic dialog

Declaration

cs-api-definition
public GenericDialog(Browser parentBrowser, string title, bool partialTitle, int buttonId, string childTextContent)

Parameters

parentBrowser

Browser

The parent browser.

title

string

The title of the dialog.

partialTitle

bool

Whether the title provided is partial or complete.

buttonId

int

The button id to click on the dialog.

childTextContent

string

A partial text that might be found on that dialog. This can help isolate this dialog from other dialogs that might have similar titles.

GenericDialog(Browser, string, bool, string)

Create a new generic dialog.

Declaration

cs-api-definition
public GenericDialog(Browser parentBrowser, string title, bool partialTitle, string childTextContent)

Parameters

parentBrowser

Browser

The parent browser.

title

string

The title of the dialog to handle.

partialTitle

bool

Whether the title provided is partial or complete.

childTextContent

string

A partial text that might be found on that dialog. This can help isolate this dialog from other dialogs that might have similar titles.

GenericDialog(Browser, string, bool, string, int, string)

All-encompassing base constructor.

Declaration

cs-api-definition
public GenericDialog(Browser parentBrowser = null, string title = "", bool partialTitle = false, string childTextContent = "", int buttonId = -1, string buttonText = "")

Parameters

parentBrowser

Browser

title

string

partialTitle

bool

childTextContent

string

buttonId

int

buttonText

string

GenericDialog(Browser, string, bool, string, string)

Create a new generic dialog.

Declaration

cs-api-definition
public GenericDialog(Browser parentBrowser, string title, bool partialTitle, string buttonText, string childTextContent)

Parameters

parentBrowser

Browser

The parent browser.

title

string

The title of the dialog.

partialTitle

bool

Whether the title provided is partial or complete.

buttonText

string

The button caption to click.

childTextContent

string

A partial text that might be found on that dialog. This can help isolate this dialog from other dialogs that might have similar titles.

GenericDialog(Browser, string, string, bool)

Create a new generic dialog.

Declaration

cs-api-definition
public GenericDialog(Browser parentBrowser, string title, string buttonText, bool partialTitle)

Parameters

parentBrowser

Browser

The parent browser.

title

string

The title of the dialog.

buttonText

string

The button caption to click.

partialTitle

bool

Whether the title provided is partial or complete.

GenericDialog(WpfApplication, string, bool)

Create a new generic dialog.

Declaration

cs-api-definition
public GenericDialog(WpfApplication parentApp, string title, bool partialTitle)

Parameters

parentApp

WpfApplication

The parent WpfApplication.

title

string

The title of the dialog to handle.

partialTitle

bool

Whether the title provided is partial or complete.

Remarks

Will simply close this dialog.

GenericDialog(WpfApplication, string, bool, int)

Create a new generic dialog

Declaration

cs-api-definition
public GenericDialog(WpfApplication parentApp, string title, bool partialTitle, int buttonId)

Parameters

parentApp

WpfApplication

The parent WpfApplication.

title

string

The title of the dialog.

partialTitle

bool

Whether the title provided is partial or complete.

buttonId

int

The button id to click on the dialog.

GenericDialog(WpfApplication, string, bool, int, string)

Create a new generic dialog

Declaration

cs-api-definition
public GenericDialog(WpfApplication parentApp, string title, bool partialTitle, int buttonId, string childTextContent)

Parameters

parentApp

WpfApplication

The parent WpfApplication.

title

string

The title of the dialog.

partialTitle

bool

Whether the title provided is partial or complete.

buttonId

int

The button id to click on the dialog.

childTextContent

string

A partial text that might be found on that dialog. This can help isolate this dialog from other dialogs that might have similar titles.

GenericDialog(WpfApplication, string, bool, string)

Create a new generic dialog.

Declaration

cs-api-definition
public GenericDialog(WpfApplication parentApp, string title, bool partialTitle, string childTextContent)

Parameters

parentApp

WpfApplication

The parent WpfApplication.

title

string

The title of the dialog to handle.

partialTitle

bool

Whether the title provided is partial or complete.

childTextContent

string

A partial text that might be found on that dialog. This can help isolate this dialog from other dialogs that might have similar titles.

GenericDialog(WpfApplication, string, bool, string, int, string)

All-encompassing base constructor.

Declaration

cs-api-definition
public GenericDialog(WpfApplication parentApp = null, string title = "", bool partialTitle = false, string childTextContent = "", int buttonId = -1, string buttonText = "")

Parameters

parentApp

WpfApplication

title

string

partialTitle

bool

childTextContent

string

buttonId

int

buttonText

string

GenericDialog(WpfApplication, string, bool, string, string)

Create a new generic dialog.

Declaration

cs-api-definition
public GenericDialog(WpfApplication parentApp, string title, bool partialTitle, string buttonText, string childTextContent)

Parameters

parentApp

WpfApplication

The parent WpfApplication.

title

string

The title of the dialog.

partialTitle

bool

Whether the title provided is partial or complete.

buttonText

string

The button caption to click.

childTextContent

string

A partial text that might be found on that dialog. This can help isolate this dialog from other dialogs that might have similar titles.

GenericDialog(WpfApplication, string, string, bool)

Create a new generic dialog.

Declaration

cs-api-definition
public GenericDialog(WpfApplication parentApp, string title, string buttonText, bool partialTitle)

Parameters

parentApp

WpfApplication

The parent WpfApplication.

title

string

The title of the dialog.

buttonText

string

The button caption to click.

partialTitle

bool

Whether the title provided is partial or complete.

Properties

ButtonId

Gets/Sets the button id to click.

Declaration

cs-api-definition
public int ButtonId { get; set; }

Property Value

int

ButtonText

Gets/Sets the button text to click.

Declaration

cs-api-definition
public string ButtonText { get; set; }

Property Value

string

ChildTextContext

Gets/Sets the child text of a child window of this dialog.

Declaration

cs-api-definition
public string ChildTextContext { get; set; }

Property Value

string

PartialTitle

Gets/Sets whether the title is partial title.

Declaration

cs-api-definition
public bool PartialTitle { get; set; }

Property Value

bool

Title

Gets/Sets the title of this dialog.

Declaration

cs-api-definition
public string Title { get; set; }

Property Value

string

Methods

Handle()

Handle this generic dialog

Declaration

cs-api-definition
public override void Handle()

Overrides BaseDialog.Handle()

IsDialogActive(WindowCollection)

If dialog is active.

Declaration

cs-api-definition
public override bool IsDialogActive(WindowCollection dialogs)

Parameters

dialogs

WindowCollection

The list of all dialogs

Returns

bool

True/False if the dialog is active.

Overrides BaseDialog.IsDialogActive(WindowCollection)