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 |
X flies from Hyd to bangalore using different methods of transportation. write the test scenarios and test cases for this?
How to analyzing test results using quicktest professional (qtp)?
What is test object model in QTP?
How will you test a stapler?
I used Child objects to get the count of the no of weblist present in the page.now i need to select the item in the weblist..Please send me full code
What is optional step in qtp? How you can add optional step in qtp?
For ex we are doing automate testing in that can we do some part of application recording, some part descriptive programing and some part general VB scripting like that .............
What is the difference between qtp and selenium?
How can we parameterize our test, values in flat file. Ex:- Values in notepad, with that values i want to parameterize the test.
How to Run a Test using QTP?
hi i have one doubt i have 4 yrs exp in testing and iam working one mnc in north but i have completed my degree correspodene is the companies are accept in south side some people are tellig they won't agree but i need correct answer plz let me know which companies are taking and not taking thanks in advance
what are the mandatory properties in qtp? what are the library functions in qtp?