Class
SaveAsDialog

SaveAs Dialog handler.

Definition

Namespace:ArtOfTest.WebAii.Win32.Dialogs

Assembly:ArtOfTest.WebAii.dll

Syntax:

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

Inheritance: objectBaseDialogSaveAsDialog

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

SaveAsDialog(Browser, DialogButton, string, Desktop)

Create the dialog passing it the parent browser and the button to use to dismiss the instance of this dialog.

Declaration

cs-api-definition
protected SaveAsDialog(Browser parentBrowser, DialogButton dismissButton, string filePath, Desktop desktopObject)

Parameters

parentBrowser

Browser

The parent browser.

dismissButton

DialogButton

The button to use to dismiss the dialog. Accepts SAVE or CANCEL.

filePath

string

The full file path to the save location.

desktopObject

Desktop

The desktop object.

SaveAsDialog(WpfApplication, DialogButton, string, string, Desktop)

Returns an Save As Dialog for use with WPF applications.

Declaration

cs-api-definition
protected SaveAsDialog(WpfApplication application, DialogButton dismissButton, string filePath, string title, Desktop desktopObject)

Parameters

application

WpfApplication

The host application.

dismissButton

DialogButton

The dismiss button to use. Accepts SAVE or CANCEL.

filePath

string

The location of the file to open.

title

string

The title of the dialog. Pass string.Empty to use default value or overwrite it in case of custom dialog.

desktopObject

Desktop

Reference to a desktop object.

Properties

SaveFileName

Gets/Sets the save file name/path to use if you are saving the file. Else set to string.empty.

Declaration

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

Property Value

string

Methods

CreateSaveAsDialog(Browser, DialogButton, string, Desktop)

Returns an Save As Dialog for use with web applications.

Declaration

cs-api-definition
public static SaveAsDialog CreateSaveAsDialog(Browser parentBrowser, DialogButton dismissButton, string filePath, Desktop desktopObject)

Parameters

parentBrowser

Browser

Parent browser object.

dismissButton

DialogButton

The dismiss button to use. Accepts OPEN or CANCEL.

filePath

string

The location of the file to open.

desktopObject

Desktop

Desktop object.

Returns

SaveAsDialog

A new SaveAsDialog.

CreateSaveAsDialog(WpfApplication, DialogButton, string, string)

Returns an Save As Dialog for use with WPF applications.

Declaration

cs-api-definition
public static SaveAsDialog CreateSaveAsDialog(WpfApplication application, DialogButton dismissButton, string filePath, string title = null)

Parameters

application

WpfApplication

The host application.

dismissButton

DialogButton

The dismiss button to use. Accepts SAVE or CANCEL.

filePath

string

The location of the file to open.

title

string

The title of the dialog. Pass string.Empty to use default value or overwrite it in case of custom dialog.

Returns

SaveAsDialog

A new SaveAsDialog.

Handle()

This is called by the DialogMonitor whenever IsDialogActive returns true.

Declaration

cs-api-definition
public override void Handle()

Overrides BaseDialog.Handle()

IsDialogActive(WindowCollection)

Check whether the dialog is present or not. This function is called by the dialogmonitor object

Declaration

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

Parameters

dialogs

WindowCollection

This is a list of dialog passes in the by the DialogMonitor object.

Returns

bool

True/False whether this dialog is present.

Overrides BaseDialog.IsDialogActive(WindowCollection)