Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Table check point for comparing data of 2 tables
#1
Hi All,

Please help me!
In 2 variables, I am storing storing 'WebTables' by calling some reusable actions. Now I want to implement tables check points and want to compare that data of both the tables is same.

I am struck in this scenario, Please help me to implement table check points on tables variables and compare data.

Regards,
Ritu
waiting for answer!!Smile

Thanks
Reply
#2
Hi,
Stand Checkpoint on Webtable can be implemented but with this, you cant compare values between 2 tables,

for your scenario, get all the required cell values from both tables and compare them

Ex:
Code:
For Table1value = Browser("...").Page("...").WebTable("Table1").GetCellData(i, j) Table2value = Browser("...").Page("...").WebTable("Table2").GetCellData(i, j) if Trim(Table1value) = Trim(Table2value) Then[hr] Please find the full code below, Rcnt1 = Browser("...").Page("...").WebTable("Table1").Rowcount Rcnt2 = Browser("...").Page("...").WebTable("Table2").Rowcount For i = 2 to Rcnt1 for j= 2 to Rcnt2 Table1value = Browser("...").Page("...").WebTable("Table1").GetCellData(i, j) Table2value = Browser("...").Page("...").WebTable("Table2").GetCellData(i, j) if Trim(Table1value) = Trim(Table2value) Then Reporter.Reportevent 0, "Values Check", ".................." Else Reporter.Reportevent 1, "Values Check", ".................." End If Next Next
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to comparing PDF Reports? ramk 0 1,380 10-10-2018, 04:41 PM
Last Post: ramk
  Comparing data from xml file and a value in gui object using UFT Lavanya N 1 2,814 07-21-2015, 03:24 PM
Last Post: Lavanya N
  Missing Resources, Information Pane, Debug Viewer, Run time Data Table not visible Aurodeepta 3 7,728 05-28-2015, 02:52 PM
Last Post: Aurodeepta
  UFT - Check a checkbox inside a table cell sara- 0 6,159 02-02-2015, 08:07 PM
Last Post: sara-
  Data Table in QTP QTPBeginer 1 4,412 08-25-2013, 02:28 PM
Last Post: GregHicks

Forum Jump:


Users browsing this thread: 1 Guest(s)