This project is read-only.

how to access dialog box

Mar 2, 2011 at 10:56 AM
Edited Mar 2, 2011 at 11: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 8:47 PM


what does

manager.GetWindows(). return?



Mar 3, 2011 at 11:34 AM



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




Mar 3, 2011 at 6: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 9:39 PM



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



Mar 4, 2011 at 1: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 1:13 PM

Hi Manoj

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