Forum Discussion
tristaanogre
8 years agoEsteemed Contributor
I'm assuming TableGrid is the component of your application? Or is it a variable in TestComplete?
If the former, that's out of the realm of possibility for TestComplete. If the method doesn't exist, you need to do the reset manually using some sort of code unit to do the reset.
As for the latter... when you exit the project, if it's a temporary variable, it will reset to defaults at the beginning of your next test run.
KorpTestComplet
8 years agoNew Contributor
I was able to change the value at runtime.
this is my procedure:
//Danilo Casassa - 26/10/2017
// rotina para comparar Tables com Grids
procedure CompareGridWithTablesGrids(tableGrid, grid : OleVariant);
var indexRow, indexCol : integer;
valorTable : OleVariant;
begin
//valida se a descrição está vazia
if (vartostr(tableGrid.Description) = '' )then
Indicator.PushText('Realizando validação da grid...')
else
Indicator.PushText(vartostr(tableGrid.Description));
//recebe o mapeamento da grid que esta sendo comparada
tableGrid.ObjectName := VarToStr(grid);
//percorre as linhas do tableGrid
for indexRow := 0 to tableGrid.RowCount -1 do
begin
//percorre as colunas da tableGrid
for indexCol := 0 to tableGrid.ColumnCount -1 do
begin
//pega o valor da table
valorTable := tableGrid.Values[indexRow, indexCol];
//converte a se o valor da tablegrid for uma expressão
valorTable := ConvertDateInDataBaseFormat(ValidateExpressionData(valorTable));
//Grid recebe o valor convertido
tableGrid.Values[indexRow,indexCol] := valorTable;
end;
end;
//Checa se os registros da Table estão de acordo com os da grid
tableGrid.Check;
Indicator.PopText();
end;I'm don't get value of the tableGrid as variable, but now I can with this code.
Thanks.