Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

In an application you have a web table. You are provided
with an external Excel sheet with the same structure as that
of the web table.
How will you retrieve all data from the web table and
compare it with corresponding data available in the excel
sheet, using QTP?
How will you report the results in QTP?

Answer Posted / saket bharti

'Get the Web Table Row and Col count using the GetROProperty

rowcount=
Browser("").Page("").WebTable("").GetRoProperty("rows")

colcount=
Browser("").Page("").WebTable("").GetRoProperty("cols")

'Create a Excel COM object to read the data from the file.
Set excelobj=CreateObject("Excel.Application")
Set excelbooks=excelobj.Workbooks.open("C:\Data-excel.xls")
Set excelsheets=excelobj.Worksheets.item("Sheet1")

'Now loop through the excel and the wettable and check their
values

for i=0 to rowcount
for j=0 to colcount

if (
Browser("").Page("").WebTable("").GetCellData(i,j)=excelsheets.Cells(i,j))
Then

Reporter.ReportEvent micPass ,"Validation","Cell values & i
& j are same"

Else

Reporter.ReportEvent micFail ,"Validation","Cell values & i
& j do not match"

End If

Next
Next

Is This Answer Correct ?    8 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

distinguish between old version and new version QTP features.

2299


What is recovery scenario manager? When you go for recovery scenario manager?

1010


What are the advantages of a Hybrid framework?

1076


What is the difference between per-action and shared?

1086


How to execute the WR Script through QTP? I have WinRunner script with initialization script, common scripts, GUI AND functions. I connected WR through QTP with "call to WinRunner" option but I am getting problem after connecting to WinRunner i.e. showing "Do you want to quit now" with 'yes' and 'No' message box

2249


How can I find out the cursor position through QTP suppose I am keep tabbing(Pressing the tab key continuously) and stoped at a position Now I want to find out where the cursor position is

6753


Explain about the test fusion report of quicktest professional (qtp)?

950


After executing the script in qtp suppose i found some script execute successfully and found some error.So how to report the status for both (i.e pass and fail report)in test director. For "fail" We use "defect tab" in testdirector. But for "pass" how to report it to TL.what is the process plz anybody ans

2103


How to release all resources file from the QTP?

1514


is it possible to add sheets to excel at runtime

3960


how did u use automating testing tools in ur job?

1917


I have developed and executed a script successfully, and saved the same to QC. When I tried to execute the script from QC, the script is not executing. What are the possible reasons?”

1126


Hi, Can anyone please tell me how to connect the QC with QTP using QTP script? Thanks in advance

1869


Explain about business process component? types and usage?

1999


Can any one tell me about "Mapping Repository Parameter Values" and why we use it....??How to use it???Please, tell the preconditions also...........???? Thanks in Advance

1931