Save Dialog ...

Sep 28, 2010 at 6:10 AM

At a certain point my application opens a Save dialog form to save some files...

how can i get the windows save dialog Automated..

Pls advise

Sep 28, 2010 at 7:11 AM


you can get the window himself only by title, because it does not have an automation ID (can't say why they don't set here an automation id, its terrible)

=> so if you test on OS with different language and the title is default (not overwritten by developer) you has search for the correct name in the current language

most other controls has an automation ID, but note that there are difference between file open and file close dialog


    private const string _openButtonAuID = "1"; //open or save button
    private const string _cancelButtonAuID = "2"; //cancel button
    private const string _textBoxPathAuID = "1148";
    private const string _textBoxPathSaveDialogAuID = "1001";
    private const string _fileTypeComboBoxAuID = "1136";
    private const string _fileTypeComboBoxSaveDialogAuID = "FileTypeControlHost"; // throws an error since Windows Vista (it's added as bug here)


I don't automate the folder on the left side (if exists) it does not work stable in automation