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?
This is a bug in our AutomationPeer. The bug is fixed in latest ServiceRelease, so if you get it, you will be able run your tests without troubles.
To get around it just turn off selection while you record your tests
Regards
I'm still experiencing the same NullReferenceException from PivotCellControlAutomationPeer.SelectedCells_SelectionChanged after having upgraded all Infragistics Silverlight controls to version 10.3.20103.2065. In which SR is this bug supposed to be fixed?
What exactly do you mean by turning off selection?