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 Members By Posting Answers For Below Questions

Please help me by providing the License key for QTP 9.2, at guru_aarya@yahoo.co.in Best Regards Gururaj.B

2905


Write the code for,In the page screen we have total 10 Links,out of these I have to click 9th link

863


describe some problems that u had with automating testing tool?

1405


Explain types of descriptive programming?

587


What is the syntax for how to call one script from another?

551






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

1600


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?

6310


Which scripting language used by quicktest professional?

524


How to associate function library at a run time?

696


What are the different types of recovery operation?

545


What is ObjectParamater?

1569


UFT 12.02 which ALM version will support

980


What are the five challenges you faced in QTP?

2749


How to handle Java tree in QTP?

740


Through array we can execute the testcase how ? give me example

1393