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
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 |
What are the limitations in using Virtual objects?
How to integrate QTP with QC using VB Scripting? What are the prerequisites to connect with QC?
Explain calling sub procedure.
Which features or drawbacks of QTP lead to the upgrade for a newer version?
Synchronozation types in QTP
We have 10 page.In first page we 2 popup and next page we 3 popup window......(windows name is different)how can we handle the all the popups without using recovery scenario
Write a function which returns the addition of two numbers. give the value of the numbers outside the function.
What is the difference between local and shared object repository in qtp?
Describe how Smart Identification is used
wt is memory leakage?
Hi All, How to get repeated word in string . Thanks Balaji
How many ways is to parameterize the value?