Forum Discussion

james_s_bullen's avatar
james_s_bullen
Occasional Contributor
12 years ago

Compare Cell of spreadsheet to value displayed on webpage

Is there a way of using checkpoints to validate what is seen on a webpage and compare it to the content of a cell in an excel spreadsheet?



I am having a hard time trying to figure out how to do this, thanks for any help in advance.

2 Replies


  • Hi James,


     


    There is an HTML Table checkpoint . However, it allows comparing only html tables. As your task is to compare an Excel table with an HTML table, you will need to create your own comparison procedure that will compare data in each cell. As Ryan suggested, you can use the DDT feature to get access to Excel's cells. The pseudocode may look like this:


     


    foreach cell in a table


       var excelCell = get value from Excel via DDT.ExcelDriver


       var webCell = get value from Web table. Explore TestComplete's Object Browser for this


       if (excelCell == webCell)


        Log.Message ("The cells are the same")