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

How to call script1 into script2?

3 Answers  


any challange that faced in your project? (please give me some examples in your project?

1 Answers  


In an output value text checkpoint, where does the output value stored by default ?

4 Answers   Ordain Solutions,


what is the mail use of frame work(with detail). architecture for keyword driven frame work

0 Answers   Persistent,


who will distribute the project modules for testing in testing team ?

2 Answers  






Is it a smart choice to use QTP for backend testing?

1 Answers   CTS,


Can we use same virtual objects in many number of tests?

1 Answers   TCS,


How can we parameterize our test, values in flat file. Ex:- Values in notepad, with that values i want to parameterize the test.

3 Answers   Ordain Solutions,


What is parameterization? What is syncronization pt.?

3 Answers   Semantic Space, SRM,


Hi Samrat, Thank u very much, what u said it is right.

0 Answers  


what is stlc and its contents?

1 Answers  


What is data driver in qtp? Where we use it?

0 Answers  


Categories