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
Please help me by providing the License key for QTP 9.2, at guru_aarya@yahoo.co.in Best Regards Gururaj.B
Write the code for,In the page screen we have total 10 Links,out of these I have to click 9th link
describe some problems that u had with automating testing tool?
Explain types of descriptive programming?
What is the syntax for how to call one script from another?
1 Folders in VSS 2 In navigation script there are 100 script i want to run first 50 and 37th script also not needed to run how to do this 3 What is navigation script,Driver script, business script what we are loaded in this script 4 use of resource tab 5 Difference between verification and validation give real scenario example 6 file scripting object when to use it 7 what are the problems you are faced while testing web application 8 difference between expert view and keyword view 9 difference between QTP 8.2 and QTP 9.2 navigation frame work please answer these questions from real time working people as early as possible
in qtp 3 sheets is there in data table like global, action1, action2. I want to check the rows and columns in action2. how can check using script?
Which scripting language used by quicktest professional?
How to associate function library at a run time?
What are the different types of recovery operation?
What is ObjectParamater?
UFT 12.02 which ALM version will support
What are the five challenges you faced in QTP?
How to handle Java tree in QTP?
Through array we can execute the testcase how ? give me example