Hi,
As I see from your screenshot the values are in tabular form.You can read these values from the screen and save them to a dictionary.For example
//get the reference of the table object on the screen and save it in a variable
tableDetails := yourtableobject;
//Read the values on the screen including the Label field and value field and label will be the key in dict
dict := sys.OleObject['Scripting.Dictionary'];
for i:=0 to tableDetails.Rows.Count -1 do
begin
dict.Add(tableDetails.Rows.Column[1].innerText,tableDetails.Rows.Column[2].innerText) //the syntax may not be right
end;
//Once you add all your screen values to the dictionary now can read the expected excel values which you need to compare with in the same way into another dictionary say Dict1
//Now you have two dictionaries you can loop through them and compare them
//here Dict and Dict 1 will have the same record count unless some field is missing on your screen but present in your excel sheet or viceversa if thats the case you can straightaway log it as a error if you want to
key := dict.Keys;
key 1:= dict1.Keys;
//according to your screen shot i am imagine that both the excel has 4 records and your screen has 4 as well, to be compared
for j:= 0 to dict.Count -1 do
begin
if VarToStr(dict.Item(key)) <> VarToStr(dict1.Item(key1)) then
Log.Error('Mismatch : Expected value for label '+ key +' is : ' dict1.Item(key1)) + ' but found on screen is ' + dict.Item(key)) )
end;