Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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



Browser("Las Vegas Hotels - Las").Page("Vegas Hotels - Hotels").Link("Lux..

Answer / 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

More QTP Interview Questions

How to handle Java tree in QTP?

0 Answers  


How to add a runtime parameter to a datasheet?

1 Answers   Crea,


What is descriptive programming?

15 Answers   Wipro,


How to Compare the 2 xl-sheets in QTP? ple write the vb Script for the comparison?

1 Answers  


some times we write user define functions.where we write main and sub program,how,where to insert the functions in qtp?

2 Answers   GE,


what is the difference between rational rose and QTP? WHICH TOOL IS BETTER TO LEARN? PLEASE SEND ME AT sana_50218@yahoo.com sandeep@epuratech.com

0 Answers   EpuraTech,


What are the types of object repository in qtp?

0 Answers  


Can any one send me the QTP Basic Coding Samples?

0 Answers  


Have you used xml check point in your project?

0 Answers  


How can we change(increase or decrease)the size of a array variable with out loosing the previous values

1 Answers   DST Global Solutions,


How will you check that your test cases covered all the requirements?

0 Answers  


In application which areas to be automated and what kind of situation will be take? using QTP? Plz give me the clear answer

0 Answers   Tavant Technologies,


Categories