Hi,
Loop through each table cells and compare it i.e use getcelldata to get the
data of cells of the table
FInd below the code .Also find the attached html page.
Add two tables present in the attached page in the OR and then execute the
below code and check the report
rc=Browser("Browser").Page("Page").WebTable("Name").RowCount
cc=Browser("Browser").Page("Page").WebTable("Name").ColumnCount(1)
set FirstTableObj= Browser("Browser").Page("Page").WebTable("Name")
set SecondTableObj= Browser("Browser").Page("Page").WebTable("Name_2")
For i=1 to rc
For j=1 to cc
If FirstTableObj.getcelldata(i,j)=SecondTableObj.getcelldata(i,j)
Then
reporter.ReportEvent micPass,"Table Comparision","First table
Row"&i&" Col"&j&"="&FirstTableObj.getcelldata(i,j)&vbnewline&"Second table
Row"&i&" Col"&j&"="&SecondTableObj.getcelldata(i,j)
End If
Next
Next
On Tue, Dec 21, 2010 at 4:59 AM, Kiran Edupuganti <kiransw...@gmail.com>wrote:
> Hi,
>
> I can share suggestions , could not provide code at this point of time.
>
> Assuming both webtables have same columns and are in same order.
>
> a) Have read sorting techniques in C language , while doing different
> sortings for an array we need to perform different ways of comparision.
> b) So my suggestion , put the target table in highest loop and put the
> source table in inner loop. compare every target cell value with source cell
> value. indicates the differences in the separate text file.
> c) Also you can do with Source to Target comparision.
>
> another approach.
>
> Store Webtable data into two separate COM recordset objects and compare it
> using the techniques. This approach is faster than above approach.
>
> Regards,
> Kiran Edupuganti
> On Mon, Dec 20, 2010 at 4:10 AM, Sreedhar <sreedhar6...@gmail.com> wrote:
>
>> Create two dictionary objects and add all values from webtable 1 to first
>> dictionary object and values from webtable 2 to second dictionary object
>> and
>> Compare both of them.
>>
>>
>> Sreedhar Mallipeddi
>>
>> -----Original Message-----
>> From: mercuryqtp@googlegroups.com [mailto:mercury...@googlegroups.com] On
>> Behalf Of satish p
>> Sent: Sunday, December 19, 2010 8:32 AM
>> To: smercuryqtp
>> Subject: how to solve the webtable
>>
>> Hi all,
>> Please tell me, how to comparision two webtable on the browser
>> ,please post the answer
>>
>> Regareds,
>> sateesh
>>
>> --
>> You received this message because you are subscribed to the Google
>> "QTP - HP Quick Test Professional - Automated Software Testing"
>> group.
>> To post to this group, send email to MercuryQTP@googlegroups.com
>> To unsubscribe from this group, send email to
>> mercuryqtp+unsubscr...@googlegroups.com<mercuryqtp%2bunsubscr...@googlegroups.com>
>> For more options, visit this group at
>> http://groups.google.com/group/MercuryQTP?hl=en
>>
>> --
>> You received this message because you are subscribed to the Google
>> "QTP - HP Quick Test Professional - Automated Software Testing"
>> group.
>> To post to this group, send email to MercuryQTP@googlegroups.com
>> To unsubscribe from this group, send email to
>> mercuryqtp+unsubscr...@googlegroups.com<mercuryqtp%2bunsubscr...@googlegroups.com>
>> For more options, visit this group at
>> http://groups.google.com/group/MercuryQTP?hl=en
>>
>
>
>
> --
> Kiran Edupuganti
> M.no: 9866424362
>
> --
> You received this message because you are subscribed to the Google
> "QTP - HP Quick Test Professional - Automated Software Testing"
> group.
> To post to this group, send email to MercuryQTP@googlegroups.com
> To unsubscribe from this group, send email to
> mercuryqtp+unsubscr...@googlegroups.com<mercuryqtp%2bunsubscr...@googlegroups.com>
> For more options, visit this group at
> http://groups.google.com/group/MercuryQTP?hl=en
>
--
Thanks and Regards,
Govind
--
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to MercuryQTP@googlegroups.com
To unsubscribe from this group, send email to
mercuryqtp+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en
Name |
Age |
Govind |
20 |
ram |
25 |
Name |
Age |
Govind |
20 |
ram |
25 |