TC Assigned incorrect value to loop variable
i got a confused problem that the TC assigned the incorrect value to variable in loop.
below is my script with the for loop. there is any issue is this?
var i,RowCount: integer;
begin
RowCount: = VarToInt(Aliases.RegistryReset.MainForm.dataGridViewRegistryInfo.RowCount);
dataGridView: = Aliases.RegistryReset.MainForm.dataGridViewRegistryInfo;
for i: = 0 to RowCount - 1 do;
begin
if i = 0 then
Log.Message(i);
Log.Message(RowCount);
if aqConvert.CurrencyToStr(Aliases.RegistryReset.MainForm.dataGridViewRegistryInfo.wValue[i,0]) = 'Track Trial Keys' then
begin
//do something;
end;
end;
end;
in my application. there is only one row in datagrid object in fact. so the value of the variable i it should be 0 when i run this first. but the Log.Message(i) statement does not be executed then i step by step to exectue it.
and the error 'The control item 1 not found.' i think that's due to the row 1(row index start from 0) does not exists actully.
appericate deeply if anyone can give help for me.