how to access dialog box

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

Hi

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

Hi

what does

manager.GetWindows(). return?

 

Throndorin

Mar 3, 2011 at 11:34 AM

HI

 

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

 

Thanks

 

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

Hi

 

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

 

Throndorin

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?

 

Thanks

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"