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
105
PivotGrid and Coded UI Tests
posted

Hi,

I'm trying to test our Silverlight application that contains the xamPivotGrid control with coded UI tests. Coded UI testing is a feature introduced in the Microsoft Visual Studio 2010 Feature Pack 2 that allows testers to record actions and then play them back in their web browsers.

For more information about Coded UI tests, please see http://msdn.microsoft.com/en-us/library/gg269472.aspx

When recording an action that starts loading data to the PivotGrid I get the following error:

Unhandled Error in Silverlight Application Object reference not set to an instance of an object.
   at Infragistics.Controls.Grids.AutomationPeers.PivotCellControlAutomationPeer. SelectedCells_SelectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
   at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
   at Infragistics.Collections.CollectionBase`1.OnNotifyCollectionChanged(NotifyCollectionChangedEventArgs args)
   at Infragistics.Collections.CollectionBase`1.OnResetItems()
   at Infragistics.Controls.Grids.PivotSelectedCollectionBase`1.InternalResetItemsSilently()
   at Infragistics.Controls.Grids.PivotSelectedCollectionBase`1.ResetItems()
   at Infragistics.Collections.CollectionBase`1.Clear()
   at Infragistics.Controls.Grids.XamPivotGrid.ArrangeLayout()
   at Infragistics.Controls.Grids.XamPivotGrid.DataSourceResultChanged(Object sender, AsyncCompletedEventArgs e)
   at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
   at Infragistics.Olap.DataSourceBase.OnResultChanged(AsyncCompletedEventArgs args)
   at Infragistics.Olap.DataSourceBase.RunWorkerCompleted(Object sender, RunWorkerCompletedEventArgs e)
   at System.ComponentModel.BackgroundWorker.OnRunWorkerCompleted(RunWorkerCompletedEventArgs e)
   at System.ComponentModel.BackgroundWorker.<OnRun>b__1(Object state)

Stopping the action recording and trying to generate code for the test yields the following error:

System.NotSupportedException was unhandled
  Message = GetProperty of "SelectedItemsAsString" is not supported for the following control type: List. If this is a custom Silverlight control, verify that the property is supported for the control.
  Source = Microsoft.VisualStudio.TestTools.UITest.Extension.Silverlight

Do you have any ideas how to get around this and are there any plans on supporting coded UI tests in the future?