select box ClickItem working intermittently
I am seeing the log message with the correct index for the selectItem. No errors or warnings are printed for the log. About 60% of the time the item in the drop down box does NOT change. When this occurs I do see that the attempted recovery mechanism is triggered , that is, I do get trying again 7 times, however, the drop down box never changes. So I have tried various combinations of refresh and delays, but do not see any difference. It seems as if there were a problem needing a refresh on the GUI object, then the while ( (select.wText != selectItem) would not see the problem as it would still be pointing to the incorrect GUI object.
This is happening in both 10.5 TestComplete and TestExecute..... It just started happening today.
Has anybody seen anything similar?
Thanks.
function ClickItem_ExactMatch(select, selectItem)
{
.................
if(foundItem) {
Log.Message("ClickItem index = " + index);
select.ClickItem(index);
// 3.9.2015 for add paycards, item is being selected per log (i.e. no error indication) but not changing - HACK attempted work-around
var maxTries = 0;
while ( (select.wText != selectItem) && (maxTries < 7) ) {
delay(1500);
maxTries++;
Log.Message("trying again!");
select.Refresh();
select.ClickItem( select.wItemCount - 1 );
select.ClickItem(index);
}
}