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
How many add-ins comes by default with qtp?
How to get popup error message.
what is the difference btn risks & Therads in the Test plan documentation?
How you will rate urself in QTP in the range of 0 to 5
What are the different types of recovery operation?
is it possible to add sheets to excel at runtime
What is meant by Step generator?what is the use of this? we have 3 steps know there what r all those.? can u all pls give me clear idea of this
Explain how qtp identifies objects?
What is active screen?
How to Get the Run-time value of an object under that web app under Test to the local data table sheet of that Action?
wht is Manual Testing Frame work. Pls anybody can give appropriate answers
What is data driver in qtp? Where we use it?
Explain the types of properties that quick test learns while recording?
Explain how qtp identifies object?
Hi. I have completed B.TECH(CS) , But I will go to "SECURITY CONSOLE OPERATING" [C.C CAMERA abservation]. IF interviwer asks " Why you choose this job ?" What we will say? urgent.........................urgent...........