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
What is the parameterization?
Shall we add Local Repository to shared object repository,if yes,how we add
i need to add 1000 users in a domain i written the script for that and it is running successfuly but the problem is that my system is not the user of that domain in which i have to add users so for adding users in that domain i have to install qtp on that another system, can anybody suggest me the way to add those users from my system ultimately i want to know how to access remote computer through script
what is the mail use of frame work(with detail). architecture for keyword driven frame work
In a flight window we have to enter the name and meal request for every passenger.In that window if we give Total passengers=1 then the Psngr1 name field and psngr1 meal request field will reflects.if we give Total passengers=2 then Psngr1 name field and psngr1 meal request field,Psngr2 name field and psngr2 meal request field and so on. how we can handle this scenerio thru Descriptive programming?
how will you check how many members visited the website www.infosys.com?
Hi all Can u give me the link where we can download full version of qtp my mail id is karthic.venkitapathi@gmail.com
How can i use virtual objects? If have i created one new virtual object in a virtual object manager by following instructions.
Is it possible to call win runner script in qtp?
How would you directly trigger javascript in a test?
Difference between action & Reusable action?
Suppose I want fail that check point? How can you do that?
How many tabs are available to view your test in a test pane and what are they?
Key word driven framework
How do you convert manual test cases to automated test cases?