pixi_av
15 years agoOccasional Contributor
dlgSaveTheFileAs
Is there any unified way to dealing with OS save as dialogs?
I am testing an application, which opens a custom print dialog on "finish" command, but if no printer is installed an OS-built-in save as dialog appears.
I've written a piece of code that checks for the dialog:
if (Aliases.splwow64.dlgSaveTheFileAs.Exists)
{
if (Aliases.splwow64.dlgSaveTheFileAs.WaitProperty("Visible", true, 1000))
Aliases.splwow64.dlgSaveTheFileAs.btnCancel.ClickButton();
}
Problem is, that "finish" command also clears data in the form that opens said dialogs, so the form sometimes gets focus instead of save as dialog. In those cases Test complete does not recognize save as dialog and it just waits.
I've read this article http://smartbear.com/support/viewarticle/12178/
Could you help me applying code so this does not happen.
I am testing an application, which opens a custom print dialog on "finish" command, but if no printer is installed an OS-built-in save as dialog appears.
I've written a piece of code that checks for the dialog:
if (Aliases.splwow64.dlgSaveTheFileAs.Exists)
{
if (Aliases.splwow64.dlgSaveTheFileAs.WaitProperty("Visible", true, 1000))
Aliases.splwow64.dlgSaveTheFileAs.btnCancel.ClickButton();
}
Problem is, that "finish" command also clears data in the form that opens said dialogs, so the form sometimes gets focus instead of save as dialog. In those cases Test complete does not recognize save as dialog and it just waits.
I've read this article http://smartbear.com/support/viewarticle/12178/
Could you help me applying code so this does not happen.