how to access dialog box

Mar 2, 2011 at 9:56 AM
Edited Mar 2, 2011 at 10:12 AM


When i start up my application a dialog box appears which has username and password field. Behind the login dialogbox there is a logo as the background.

I am using "Visual UI  Automation Verify"

in that it shows as

-"pane" "My Application"--------------> (has not automation id)

   ----"Window" "login"


Application manager = Application.Launch(@"C:\Program Files\MyApplication\app.exe");

 Window mainWindow = manager.GetWindow("Login");

So due to this the above script is not recognizing the dialog box.


Mar 2, 2011 at 7:47 PM


what does

manager.GetWindows(). return?



Mar 3, 2011 at 10:34 AM



It returns zero count. It does not recognize any thing, it is empty.




Mar 3, 2011 at 5:33 PM

Is it detected as modal window or message box. I had similar issue with one of the application. It was detected as message box.

Mar 3, 2011 at 8:39 PM



you can try to get from Desktop.Instance, if no other way helps.



Mar 4, 2011 at 12:10 PM


Hi Throndorin


Thanks for the info but i am not sure how to use Desktop.Instance.  Could you please elaborate?



Mar 4, 2011 at 12:13 PM

Hi Manoj

The "Visual UI Automation Verify" detects the background image as "pane" and the login box as "Window"