Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
click each web link in a page using Index or other method in QTP
#6
Solved: 10 Years, 10 Months, 1 Week ago
Hi

Try this code

Code:
Set oFrame = Description.Create()
oFrame("micclass").Value =  "Frame"
Set oLinks = Description.Create()
oLinks("micclass").Value = "Link"
Set objFrame = Browser("B").Page("P").ChildObjects(oFrame)
FrameCount = objFrame.Count
If FrameCount > 0 Then
For i = 0 to FrameCount-1
  Set objLinks = Browser("B").Page("P").objFrame(i).ChildObjects(oLinks)
  LinkCount = objLinks.Count
  If LinkCount > 0 Then
      For k = 0 to LinkCount-1
objLinks(k).Click
Next
  Else
  Msgbox "Links Does not exist in Fame no "&k
  End If
Next
Else
Msgbox "Frame object does not exist"
End
Reply


Messages In This Thread
RE: click each web link in a page using Index or other method in QTP - by KVK - 07-10-2009, 03:13 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Question Webtable contains cell contains two links, how to click on link srinivassure 9 52,816 07-30-2016, 03:41 PM
Last Post: Akshay
  VB Script to count number of links in a web page. Suma Parimal 4 24,850 07-01-2015, 12:59 PM
Last Post: govind
  Upgraded QTP 11.0 to UFT 11.53, Object Index Properties are varying Raghava M 0 2,089 01-28-2015, 06:02 PM
Last Post: Raghava M
  General run error. Line (18): "Loop while Browser("Index:=0").Object.Busy" AshokReddy 3 4,839 12-20-2013, 01:44 PM
Last Post: sshukla12
  Unable to select a combo item by value or index martinshort 2 3,189 08-26-2013, 07:55 PM
Last Post: sudhirzpatil

Forum Jump:


Users browsing this thread: 2 Guest(s)