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...

hi,
In A Table there are some columns and dynamic rows and in each
row in first column there is a link with name. upon clicking on
that link it will show some details. write the vbscript to check
that link without descriptive programming?

Answer Posted / pramod mallick

I think, the table mentioned here is not Excel sheet. It is
a html table on a web page, where 1st colum contains links
with name="name".

So, the porblem is when you 1st record the script, there
are 2 rows (example) and 2 links with description = "name",
so, qtp object repository will add location property to
link (1st link = Location:0, 2nd Link = Location:1 etc..)

When you execute the script, there are 5 links with
name="name" (because of 5 dynamic rows added). Now, how do
you select /click other 3 links (3,4 and 5). Because, you
have only 2 Links recorded.

The 1st and best solution is descriptive programming. The
interviewer asked for without desriptiev programming.

The psedu code is given below.
-- Record only one link (with location:0)

Do

browser.page.frame.Link(location:0).Click
-- Change object description for Link, Update Location
to 1 instead of 0.
bExist = Browser(b).Page(p).Link.Exists

Loop While bExist = True

Is This Answer Correct ?    1 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is fragmentation and paging?

1981


images are dynamically changes how to compare two images with out using the bitmap

2368


Does QTP record on Objects created on XWindows Environment?

2160


Can we call qtp test from another test using scripting. Suppose there are 4 tests and I want to call these tests in a main script. Is this possible in qtp?

1050


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?

4487


What are advantages of test automation?

1097


How you can decide which type of object repository you have to use?

1129


Explain how Does Run time data (Parameterization) is handled in QTP?

988


What is checking bitmaps?

970


Is virtual object supported in low level recording mode?

1118


what is Property......End Property loop? how to write sript for it in QTP

2348


What are the different types of recording modes in qtp? Which will be used when?

1015


Plz Explain How to access Or Store Script from VSS? Explain Real time work (qtp) where you store folders and next to how to you access that folders and how you maintain folders in VSS ? What are the Menu's in VSS? Suppose in Manual, by using Checkin Checkout u can access documents. how you access in QTp REal time?

2027


how could i download qtp in which i get add-in support for 'oracle' is there any way to get it? i finding but not getting pls help me out :)

1786


When using descriptive programming?

1052