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 |
What is the difference between driver-script and AOM-script?
I want some banking domain projects where can i get this projects ( anybody can help me plz)
before launching qtp, we need to close all the open browsers u dont know what are all the browsers either it might be ie,mozilla etc and u dont know how many brosers are open.... u need to close all these before launching qtp.. can anyone plz temme d solution...
What is the Limitations of Testing ?
How to Import data from a ".xls" file to Data table during Runtime.
Please tell me the steps to record the test in Analog recording mode in QTP version 9.2???
How can we translate the steps between the Keyword and Expert Views?
The structure of keyword driven frame work is like a folder structure the different sub folder are 1-functional libray folder 2-object repository folder 3- database folder 4-appliction1.xls 5-initalzation vbs file 6-sequence file 7-driver script 8-test case list file My question is whether these are in a local server machine or in our pc.((whether It like Vss). can u give example of driver script(code)
Where you can store check point results?
In Object Repository, two actions r there. Action1 name is A.tsr, Action2 name is B.tsr. Is it Possible? if Yes, what is the out put of A+B? if No, why?
Can you list some technologies that support qtp?
How to add a page checkpoint to your test?