alinder
11 years agoContributor
ChildCount property value not updating correctly in TestExecute 10
I have a block of code in a custom script operation that iterates through all the children of a panel and writes their text values (if any) into an array for a specific kind of test.
This used ChildCount on the panel to dimension the array, and then as the upper boundary on the loop we use to iterate through the child objects.
This code worked without issue in TestExecute 8 and TestExecute 9. However, in TestComplete 10 the ChildCount value is remaining from an older version of the object, and is only being updated when the text value for the child object is being read out inside the loop. This results in test exceptions when the loop tries to perform actions against objects that don't exist.
In all versions, Aliases.RefreshMappingInfo was called before retrieving the panel object.
During the debug process for this issue, RefreshMappingInfo was called directly on the panel before operations were taken with it, with no improvement.
The workaround that has been found to work is calling Refresh on the panel, which seems to be the apparent workaround.
It is not ideal that our test code requires modification to execute properly when we test agaisnt Windows 8.1 with TestExecute 10.
This used ChildCount on the panel to dimension the array, and then as the upper boundary on the loop we use to iterate through the child objects.
This code worked without issue in TestExecute 8 and TestExecute 9. However, in TestComplete 10 the ChildCount value is remaining from an older version of the object, and is only being updated when the text value for the child object is being read out inside the loop. This results in test exceptions when the loop tries to perform actions against objects that don't exist.
In all versions, Aliases.RefreshMappingInfo was called before retrieving the panel object.
During the debug process for this issue, RefreshMappingInfo was called directly on the panel before operations were taken with it, with no improvement.
The workaround that has been found to work is calling Refresh on the panel, which seems to be the apparent workaround.
It is not ideal that our test code requires modification to execute properly when we test agaisnt Windows 8.1 with TestExecute 10.