I am using a coded UI testing harness that looks at a jQuery grid that we have written. The problem that I am encountering is that when the grid pages, the coded ui keeps track of the old controls when I try to call the paging again. I guess an example would explain it better:
BaseMap.MSMaintenanceMap.PageNext();
BaseMap.MSMaintenanceMap.PageNext();
this is the code that I am trying to get to work. The problem is here in the generated designer file:
if ((this.mUITitlePagingRowRow == null))
{
this.mUITitlePagingRowRow = new UITitlePagingRowRow(this);
}
When I change it to this:
this.mUITitlePagingRowRow = new UITitlePagingRowRow(this);
it works every time. Problem is when the uitest gets re-generated, this reverts back for obvious reasons. Is there any additional parameters that anyone knows that I can put in the .uitest file to always get the latest version of a control?
Add AlwaysSearch to the SearchConfigurations of the control, this forces the test not to cache the control but always look for it using the defined properties. Hope this helps.