# Dialog Handling Steps

<a href="/automated-tests/recording/recording-dialogs" target="_blank">Recording dialogs</a> 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:

* [Dialog Handling Steps](https://www.telerik.com/teststudio/documentation/features/dialogs-and-popups/dialogs#dialog-handling-steps)
  * [Add a Handle Dialog Step Manually](https://www.telerik.com/teststudio/documentation/features/dialogs-and-popups/dialogs#add-a-handle-dialog-step-manually)
  * [Properties for Handle Dialog Steps](https://www.telerik.com/teststudio/documentation/features/dialogs-and-popups/dialogs#properties-for-handle-dialog-steps)
  * [Timeouts](https://www.telerik.com/teststudio/documentation/features/dialogs-and-popups/dialogs#timeouts)
  * [Handle Button](https://www.telerik.com/teststudio/documentation/features/dialogs-and-popups/dialogs#handle-button)
  * [Download and Upload Paths in Web Test](https://www.telerik.com/teststudio/documentation/features/dialogs-and-popups/dialogs#download-and-upload-paths-in-web-test)
  * [SaveFile and OpenFile Paths in WPF Test](https://www.telerik.com/teststudio/documentation/features/dialogs-and-popups/dialogs#savefile-and-openfile-paths-in-wpf-test)

## 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 <a href="/features/custom-steps/overview#add-a-general-step-from-the-step-builder" target="_blank">Step Builder</a>. 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](https://www.telerik.com/teststudio/documentation/assets/e1571dcfe8d18dd4a469b5d8906e98f7/dialog-step-builder.png)

## 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](https://www.telerik.com/teststudio/documentation/assets/e6359ef8ed57bbf4a1892144036c3705/timeouts-extended-menu.png)

## 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](https://www.telerik.com/teststudio/documentation/assets/8b5f26ba2e874116f2b353453b8ada8c/handle-button.png)

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](https://www.telerik.com/teststudio/documentation/assets/7f89d16a941d70a65edec5684fad50db/button-warning.png)

## 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](https://www.telerik.com/teststudio/documentation/assets/38c45f0009e9e30c7190f1770fbfde18/download-path.png)

> **Tip!**
> <br>
> <br>
> If the user selects any system folder which can be replaced with a <a href="https://learn.microsoft.com/en-us/windows/deployment/usmt/usmt-recognized-environment-variables" target="_blank">recognized system variable</a> **Test Studio automatically converts the path using the respective system variable**
> <br>
> <br>
> 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](https://www.telerik.com/teststudio/documentation/assets/9a2866eae5d390c2ae3cac05aed0305c/file-upload-extended-menu.png)

## 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 property in WPF SaveFile](https://www.telerik.com/teststudio/documentation/assets/5ce19f0e6a561c9c360c906384104d4a/filepath-in-savefile-dialog.png)

> **Tip!**
> <br>
> <br>
> If the user selects any system folder which can be replaced with a <a href="https://learn.microsoft.com/en-us/windows/deployment/usmt/usmt-recognized-environment-variables" target="_blank">recognized system variable</a> **Test Studio automatically converts the path using the respective system variable**
> <br>
> <br>
> 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 **FilePath** property in **OpenFile** dialog accepts multiple files listed quoted and space separated. These will be uploaded if the server accepts multiple files upload.

![FilePath property in WPF OpenFile](https://www.telerik.com/teststudio/documentation/assets/44fdfafe91e17cafbe61280f3f70a352/open-file-dialog-multiple-file.png)
