Suppose there are 100 links in a web page and the number of
links will be changing dynamically from time to time. I
need code such that every time i had to click on the last
link of the web page.
Answers were Sorted based on User's Feedback
Below code will work for your case.
' Set a description object to identify links.
Set oDesc = Description.Create()
oDesc("html tag").Value = "A"
' Get a collection of links
Set oLinkCollection = Browser("test").Page
("test").ChildObjects(oDesc)
Set obj=oLinkCollection.Item(oLinkCollection.Count-1)
obj.Click
| Is This Answer Correct ? | 6 Yes | 1 No |
Answer / kiran
set odesc = decription.create
odesc("micclass").value = "Link"
set n = browser("xxx").page("xxx").childobjects(odesc)
objcount = n.count
browser("xxxx").page("xxxx").link("index:="&objcount-1).click
| Is This Answer Correct ? | 5 Yes | 1 No |
Answer / qtp
set odesc = decription.create
odesc("micclass").value = "Link"
set n = browser("xxx").page("xxx").childobjects(odesc)
objcount = n.count
n(objcount-1).click
| Is This Answer Correct ? | 0 Yes | 0 No |
How do you perform Regreession Testing?
When you open QTP, how many sheets you can see?
Explain building blocks of the bpt framework ?
How to identify 2 versions of browsers based on regular expression
How to remove associated function library?
what is Automation frame work and how do u used this for your project?
What should we say if interviewer asks "What is ur project architecture?".......Can any one help me with clear information.?????????
Are u place all QTP Framework folders in VSS?
how to identify a webtable coulmn values ,if we spy the coulmn value it is sometimes identifying as Webedit and some times it is identifying as "webelement", Could any body let me know how to handle the issue?
what is the data driven testing?
what is a active x control?can any one brief me about active x controls
hello everyone, can anybody please tell me what are the different recording modes of QTP, and where these recording modes are present in QTP 9.2. Thanks in advance, Gaytri