bphillips
13 years agoNew Contributor
Unable to recognize multiple instances of WPF windows in process lifetime
We are using TestComplete v9.3 to automate testing of a WPF application. We have been able to successfully test a lot of the application with TestComplete but there is one major issue that we have not been able to resolve. Within the application we display popups/windows when a button is clicked, the user can enter data into the pupup/window and then the data is passed back to the main window. We have been able to automate this task with TestComplete but we can only get it to work once before we have to restart the application if we need to access the same popup/window.
When looking at the NameMapping, i can see that TestComplete has automatically used RootVisual.ClrClassName and WndCaption to distinguish the different popups/windows within our application. The first time a popup/window is launched I am able to highlight the popup/window from NameMapping - Mapped Objects. However, when I "submit" data (click OK) on the popup/window and re-launch the same popup/window I am not able to highlight the object again and I receive a warning that the object is not visible.
I have noticed that on the first launch the new window has a Name in the Object Browser of WPFObject("HwndSource: ConfirmationInteractionWindow", "Add Miscellaneous") and the next time the window is opened it has a name of WPFObject("HwndSource: ConfirmationInteractionWindow", "Add Miscellaneous", 1). Is this an issue or can/should TestComplete handle this? I have tried editing the Mapped Objects to include both of these names but that did not work (see Attachment 1).
This issue is limiting our testing efforts so any help would be appreciated. Please let me know if there are any additional details that I need to provide.
Thanks!
When looking at the NameMapping, i can see that TestComplete has automatically used RootVisual.ClrClassName and WndCaption to distinguish the different popups/windows within our application. The first time a popup/window is launched I am able to highlight the popup/window from NameMapping - Mapped Objects. However, when I "submit" data (click OK) on the popup/window and re-launch the same popup/window I am not able to highlight the object again and I receive a warning that the object is not visible.
I have noticed that on the first launch the new window has a Name in the Object Browser of WPFObject("HwndSource: ConfirmationInteractionWindow", "Add Miscellaneous") and the next time the window is opened it has a name of WPFObject("HwndSource: ConfirmationInteractionWindow", "Add Miscellaneous", 1). Is this an issue or can/should TestComplete handle this? I have tried editing the Mapped Objects to include both of these names but that did not work (see Attachment 1).
This issue is limiting our testing efforts so any help would be appreciated. Please let me know if there are any additional details that I need to provide.
Thanks!