Browser("Las Vegas Hotels - Las").Page("Vegas Hotels -
Hotels").Link("Luxor") ......here Luxor is a hotel and this
is recognised as a link. I have many hotels like Luxor,
Palms etc which are all displayed as link...How do I
parametrize this by using webtable functions??? ASAP



Browser("Las Vegas Hotels - Las").Page("Vegas Hotels - Hotels").Link("Lux..

Answer / amarendra kothuru

If you want to recognize, no of links like Luxor, then the
following code explain you how to perameterize it.

This is the query you are using to recognize Luxor.
Browser("Las Vegas Hotels - Las").Page("Vegas Hotels -
Hotels").Link("Luxor")

Using Descriptive programming and data Driven approach you
can Perameterize it

Create a column in Globalsheet as CityName and enter the
Citie names in it.


Code:
ExcelSheetRoiwCount = DataTable.GetSheet
("Global").GetRowCount
For var_i = 1 to ExcelSheetRoiwCount
DataTable.SetCurrentRow(var_i)
CityName = DataTable("CityName","Globalsheet")
Result = Browser("Las Vegas Hotels - Las").Page("Vegas
Hotels - Hotels").Link("name:=&CityName).Exist(1)
If Result = True Then
Reporter.ReportEvent micPass, "City name " & CityName
& "found", "Passed"
Else
Reporter.ReportEvent micFail, "City name " & CityName
& "not found", "Failed"
End If
Next


It above code verifies the city names you have specified in
Excel Globalsheet exist in the application as Links or not.

Is This Answer Correct ?    3 Yes 0 No

Post New Answer

More QTP Interview Questions

What the differences are and best practical application of Object Repository?

0 Answers  


Can u explain about QTP framework

10 Answers   ACS,


What are the methods of the TextStream object that are used for reading from a text file?

0 Answers  


• What type of testing questions will be asked for 2+ yrs exp people in interview?

0 Answers  


How to find Operating system information using QTP script?

0 Answers  






How to load a object repository(using VBScript) ... very urgent....

4 Answers  


What is the Major difference between QTP ; LoadRunner? If u want to test an 1. erp module which automation tool you would prefer and why? and 2. for web application, which tool and why?

2 Answers   Satyam,


how to fetch the values from grid? & qtp recogniges that grid as a webelement? what u do?

0 Answers   IBM,


How to handle dynamic objects in quicktest professional (qtp)?

0 Answers  


What are the types of object repositories? Which one is you are using?

0 Answers  


Waht is User interface and Integration Testing?

1 Answers  


What is the difference between functional spec. and Business requirement specification?

5 Answers  


Categories