Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Table check point for comparing data of 2 tables
#2
Solved: 10 Years, 8 Months, 3 Weeks ago
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


Messages In This Thread
RE: Table check point for comparing data of 2 tables - by rameshrise3 - 02-06-2010, 12:15 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to comparing PDF Reports? ramk 0 928 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,238 07-21-2015, 03:24 PM
Last Post: Lavanya N
  Missing Resources, Information Pane, Debug Viewer, Run time Data Table not visible Aurodeepta 3 6,763 05-28-2015, 02:52 PM
Last Post: Aurodeepta
  UFT - Check a checkbox inside a table cell sara- 0 5,464 02-02-2015, 08:07 PM
Last Post: sara-
  Data Table in QTP QTPBeginer 1 3,625 08-25-2013, 02:28 PM
Last Post: GregHicks

Forum Jump:


Users browsing this thread: 1 Guest(s)