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

Parents
  • 138253
    Offline posted

    Hello Polina,

    Thank you for your post. I have been looking into your issue and it may occurs because of a lot of changes and modification of the source code of our controls that you want to test using Coded UI. Currently we do not provide official support for this kind of automation tests and it is expected after several versions of our toolsets to appears issues with a functionality which is not maintained. This kind of automation may work well for some of our controls like XamDataGrid but it is still not fully applied for all of the controls.

    My suggestion is to submit a product idea at http://ideas.infragistics.com about full support for coded UI Testing with our XAML controls.

Reply Children