Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
40
XamDataTree and Coded UI tests
posted

Hi,

We are testing our Silverlight application with Coded UI tests. After Infragistics version update from 12.2 to 14.1 we have problems with XamDataTree control. With new version we are not able to handle XamDataTree control child controls using FindMatchingContlos function - result collection is always empty. We also are not able to use function GetChildren because it generates exception:

Microsoft.VisualStudio.TestTools.UITest.Extension.UITestException was unhandled by user code   HResult=-2146233087   Message=An exception occurred when trying to discover information about a Silverlight control.   Source=Microsoft.VisualStudio.TestTools.UITest.Extension.Silverlight   BasicMessage=An exception occurred when trying to discover information about a Silverlight control.   StackTrace:        at Microsoft.VisualStudio.TestTools.UITest.Extension.Silverlight.SilverlightControlManager.SendMessage(ExtensionQueryMessage functionMessage, Int32 responseTimeOut, InvalidateParams param)        at Microsoft.VisualStudio.TestTools.UITest.Extension.Silverlight.SilverlightControlManager.SendMessage(ExtensionQueryMessage functionMessage, InvalidateParams param)        at Microsoft.VisualStudio.TestTools.UITest.Extension.Silverlight.SilverlightControlManager.ChildEnumeration(EnumeratorData data, ChildEnumeratorAction action, Int32& newEnumeratorIndex, List`1 elements, InvalidateParams param)        at Microsoft.VisualStudio.TestTools.UITest.Extension.Silverlight.ChildrenEnumerator..ctor(SilverlightElement element)        at Microsoft.VisualStudio.TestTools.UITest.Extension.Silverlight.SilverlightTestPlugin.GetChildren(IUITechnologyElement element, Object parsedQueryIdCookie)        at Microsoft.VisualStudio.TestTools.UITest.Framework.SwitchingHelper.GetChildrenEnumerator(IUITechnologyElement element, Object parsedQueryIdCookie)        at Microsoft.VisualStudio.TestTools.UITest.Framework.UITestService.GetChildren(IUITechnologyElement element, Object parsedQueryIdCookie)        at Microsoft.VisualStudio.TestTools.UITesting.UITestControlCollection.FromChildren(UITestControl parentElement)        at Microsoft.VisualStudio.TestTools.UITesting.UITestControl.GetChildrenPrivate()        at Microsoft.VisualStudio.TestTools.UITesting.UITestControl.<GetChildren>b__17()        at Microsoft.VisualStudio.TestTools.UITesting.CodedUITestMethodInvoker.InvokeMethod[T](Func`1 function, UITestControl control, Boolean firePlaybackErrorEvent, Boolean logAsAction)        at Microsoft.VisualStudio.TestTools.UITesting.UITestControl.GetChildren()        at SimpleCodedUITestForXamTreeAndXamDataTree.UIMap.SelectContact() in d:\TestProjects\Silverlight\SimpleCodedUITestForXamTreeAndXamDataTree\UIMap.cs:line 126        at SimpleCodedUITestForXamTreeAndXamDataTree.CodedUITest1.XamDataTreeTestMethod() in d:\TestProjects\Silverlight\SimpleCodedUITestForXamTreeAndXamDataTree\CodedUITest1.cs:line 33   InnerException:        HResult=-2146233088        Message= System.NullReferenceException: Object reference not set to an instance of an object.    at Microsoft.VisualStudio.TestTools.UITest.Extension.SilverlightUIAutomationHelper.SlSpyUtility.IsControlItemControl(AutomationPeer peer)    at Microsoft.VisualStudio.TestTools.UITest.Extension.SilverlightUIAutomationHelper.TreeWalkerHelper.GetChildren(SlNativeElement element, Boolean ignorePopup)    at Microsoft.VisualStudio.TestTools.UITest.Extension.SilverlightUIAutomationHelper.ChildrenEnumerator.GetEnumeratorData(Int32 enumeratorCapacity)    at Microsoft.VisualStudio.TestTools.UITest.Extension.SilverlightUIAutomationHelper.SlSpyTechnologyManager.<>c__DisplayClass29.<ProcessData>b__6()    at Microsoft.VisualStudio.TestTools.UITest.Extension.SilverlightUIAutomationHelper.SlSpyTechnologyManager.<>c__DisplayClass2f.<InvokeOnUIThread>b__2e()        InnerException:

Do you have some recommendations for us?

Thanks