WPF Dialog Handlers in Code
The dialogs to store a file locally or open a file in the WPF application also has dedicated handlers in the Testing Framework and need to be defined correctly, before a test can handle these.
OpenFile Dialog Handler
With OpenFile dialog you need to pass in the full path to the file to open in the WPF application and how the dialog should be handled. The options for OpenFile dialog are: DialogButton.OPEN, DialogButton.CANCEL or DialogButton.CLOSE.
SaveAs Dialog Handler
With SaveAs dialog, you need to pass in the full path and name for the file to save and how the dialog should be handled. The options for SaveAs dialog are: DialogButton.SAVE, DialogButton.CANCEL or DialogButton.CLOSE.
Note To compile the above code include the following using:
using ArtOfTest.WebAii.Win32.Dialogs;