avalesano
12 years agoOccasional Contributor
Strange problem with .NET form being recognized as Window rather than WinFormsObject
The C# application I am testing starts at a login screen where the user enters their username/password, and then clicks OK to access the main form. This login form is recognized by TC in the object browser as a .NET WinFormsObject.
However, for some reason TC is not able to recognize the main form once the user logs in. It shows up in the Object Browser as Window("WindowsForms10.Window.8.app.0.202c666", {form caption}, 1"), and TC cannot access its properties (such as the control name) which causes my test to fail.
Strangely enough though, if I close TestComplete at this point and reopen it while my AUT is still running with the user logged in and the main form showing, TC will correctly recognize the form as WinFormsObject("MenuForm") and everything works fine.
Can anyone shed some light on why this is happening or what I need to do so that TC is able to correctly recognize the window the first time without a restart?
Thanks!
However, for some reason TC is not able to recognize the main form once the user logs in. It shows up in the Object Browser as Window("WindowsForms10.Window.8.app.0.202c666", {form caption}, 1"), and TC cannot access its properties (such as the control name) which causes my test to fail.
Strangely enough though, if I close TestComplete at this point and reopen it while my AUT is still running with the user logged in and the main form showing, TC will correctly recognize the form as WinFormsObject("MenuForm") and everything works fine.
Can anyone shed some light on why this is happening or what I need to do so that TC is able to correctly recognize the window the first time without a restart?
Thanks!