New to Telerik Test Studio? Download free 30-day trial

Dialog Handling Steps

Recording dialogs is an out-of-the-box feature in Test Studio. The steps recorded for the dialogs provide various properties to fine tune the execution. The steps to handle dialogs can be added also manually in the test.

In this article you can find useful information about:

Add a Handle Dialog Step Manually

Even if you work on the tests in the project and have no active recording session, you can add the specific steps to handle a dialog from the Step Builder. All dialog steps are listed under the General section of the Step Builder, under Dialogs. Select the type of dialog to handle and add hit the Add Step button.

Step Builder Dialogs section

Properties for Handle Dialog Steps

The various properties allows you to fine tune the steps to handle dialogs across the automated page.

Timeouts

The properties common for all dialogs are the HandleTimeout - controls the time, which the test waits for the dialog to be handled, and the InitializationTime - controls the time, which the test waits before it starts searching for such dialog. It is useful to increase these when it takes longer time for the dialog to appear, or to be finished (usually for the handle download dialogs, when the file to download is too large).

Dialog steps timeouts

Handle Button

Each dialog step gives the option to change the button used to handle it during recording, or to adjust it if added manually.

Dialog handle button

The dropdown list provides all possible options for a button to handle a dialog. If you choose wrong type of button for the specific step, there is a prompt message to inform you which are the possible dismiss options for this dialog.

Choosing wrong handle button

Download and Upload Paths in Web Test

The DownloadPath and FileUploadPath properties are mandatory for the respective type dialog. They require a valid full path to the file to interact with.

File Locations

Tip!

If the user selects any system folder which can be replaced with a recognized system variable Test Studio automatically converts the path using the respective system variable

For example, if the user selects a destination folder under the current Windows user folder Test Studio automatically converts the path using the Windows variable %USERPROFILE%.

The FileUploadPath accepts multiple files listed quoted and space separated. These will be uploaded if the server accepts multiple files upload.

Multiple files upload

SaveFile and OpenFile Paths in WPF Test

The FilePath property is mandatory for the SaveFile and OpenFile dialogs. They require a valid full path to the file to interact with.

FilePath step property

Tip!

If the user selects any system folder which can be replaced with a recognized system variable Test Studio automatically converts the path using the respective system variable

For example, if the user selects a destination folder under the current Windows user folder Test Studio automatically converts the path using the Windows variable %USERPROFILE%.

In this article