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
Answer Posted / 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 View All Answers
Explain in brief about the quicktest professional automation object model?
What are the different types of qtp test assets and their extensions?
What is the use of Debug Viewer?
How does qtp identify the object in the application?
How many types of Automation frameworks are there in UFT? Describe them.
describe some problems that u had with automating testing tool?
Can any give an example(if possible templates) how to test web application using QTP. thanks in advance
How many add-ins comes by default with qtp?
How to define array in qtp?
what is the difference between IE & Netscape in web testing on a log in page
how to convert 100 into hundred repees only and viceversa
Can anyone tell me how i used QTP 9.2 use for GIS based S/w with an example?
What is the syntax to call one action in another?
Write a script to customize the test results in PDF and HTML format.
What is the quicktest professional testing process?