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 to handle Dynamically changing Objects in QTP?
Hi cud you plz answer my question.. what is the size of Object Repository?
HI, Anybody can explain Automation Test Framework...and wht do we do before start of Automation.....
plz explain QTP real time work( Means where you store scripts and how u access scripts next day? where those activities we are maintaining, If By usig VSS how the process in going on , plz explain briefly?
if you have the same application screen with 7 drop down boxes and approximately 70 values how do you test with QTP?
in qtp how i can retrive from a browser how many links are there.means total no of links used in a browser
Brief the process of testing with UFT?
i'm testing the webpage with QTP, in this wabpage i have to choose the CV from the window, but QTP can't recognize the object, so i used the Low LEvel Recording, but every time i run the test, QTP go to halt when it gets to the Recorded part, any solution for that?( except puting delay in the script and manuall selecting, because i've did that)
How to Synchronize the Browser at Field level? For example if you put Browser.sync(), its waiting upto for that Browser sync only. It should wait total Browser get upload with fields.
How to get the format of a webedit class in qtp. How can i know that particular webedit accept what type of format like "mm/dd/yyyy" or "$" or Alphanumeric
What do you mean by checkpoints in qtp?
Currently i have designed my script based on the test cases present in Quality Center. I want to run my script from quality center. Can anyone help me to get the code which will connect QTP with Quality Center and execute the test cases?