Hello,
I'm trying to run coded UI tests against some controls within a XamDockManager that itself is within a Tab control. When I replay the test it fails, but only when the XamDockManager is placed within a tab control (which of course it is in the application I'm having problems with).
I have attached a small repro that consists of a 2 column grid, with a tab control and XamDockManager on the left and the same on the right minus the tab control. If you record a coded UI test against the right hand part of the screen it works fine, if you record one against the left side of the screen it fails.
In the attached project there are tso coded UI tests. The test project is set as the startup project and in order to replicate the issue you'll need to change the file paths to point to the tree.exe file wherever it builds on your machine.
Could someone give me an idea of how to sort this?
Thanks,
Morgan
Hi Anastas,
I'm having a similar issue but the variable generated by the test builder already contains this hierarchical informational,
WpfButton uINewButton = this.UIAspenPlusV80Flash2HCWindow.UIItemCustom.UIItemTabList.UIB3HCurvesTabPage.UIB3HCurvesCustom.UIObjectmanagerGroup.UINewButton;
However, when playing back, it still can't find the button. I've tried manually set the container for this button, but no success either.
Please advise if there is anything I can do, my use case is just a button sitting on a tab page.
Hello Morgan,
This is because of issue in the CodedUITestBuilder.
But you can work around this with this additional line after variables declaration
#region Variables
.......................
this.UIMainWindowWindow.UIBARStagingTreeCustom.Container = this.UIMainWindowWindow.UIItemTabList.UIWibbleTabPage;
#endregion
Best regards
Anastas
After further research the development team have determined that this looks to be an issue with Microsoft's implementation of coded UI tests. If you look at the automation tree path that Microsoft uses to find the tree view item they're skipping layers. In other words, they're doing some tree optimizations to remove layers and in doing so they're losing the context to find the correct element. If you remove the XamDockManager and ContentPane and just put them into a GroupBox or a Button then you get the same issue. You can see this in the attached sample.
At this time it is recommended that you contact Microsoft's support with this issue. Please let me know if you have any further questions or concerns about this matter.
Sincerely,CharlieSenior Developer Support Engineer MCTSInfragistics<http://ko.infragistics.com/support>