Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I am not getting links under a frame
#1
Not Solved Smile 
I am not getting links under a frame
Ex. 2 frames are avaliable in Web page as like Top and middle. Total 12 Links are avaliable in Top Frame and no Links are available in middle frame. click on 1st link of top frame then 16 links are avaliable on middle frame and again I click on 1st link of middle frame then 2 frame are showing as like middle_Frame and List_Frame. 3 links are available on middle_Frame and 10 links are avaliable on List_frame. While i am running my QTP code then its check all links of top frame and navigate on last link of next frame but i want it to navigate on first link of top frame
QTP Code Here:
Code:
Set Frm_obj = Description.Create
Frm_obj("micclass").value = "Frame"
Set Lnk_obj = Description.Create
Lnk_obj("micclass").value = "Link"
Set Frm_Col = Browser("Title:=.*").Page("Title:=.*").ChildObjects(Frm_obj)
Frm_cnt = Frm_Col.count
ReDim MyArraryFrm(Frm_cnt)
Msgbox Frm_cnt
For i = 0 to Frm_cnt  -1
    a = Frm_Col(i).GetROProperty("name")
    MyArraryFrm(i) = a
    'Msgbox MyArraryFrm(i)
    Set Lnk_Col = Browser("Title:=.*").Page("Title:=.*").Frame("Name:="&MyArraryFrm(i)).ChildObjects(Lnk_obj)
    Lnk_cnt = Lnk_Col.Count
    ReDim MyArraryLnk(Lnk_cnt)
    msgbox Lnk_cnt
    For j = 0 to Lnk_cnt -2
'        b = Lnk_Col(j).GetROProperty("name")
'        MyArraryLnk(j)=b
        'Msgbox MyArraryLnk(j)
        sURL = Lnk_Col(j).GetROProperty("url")
        sText = Lnk_Col(j).GetROProperty("text")
        Print  sText  & "= "  & sURL
        Lnk_Prop = Lnk_Col(j).GetROProperty("name")
        MyArraryLnk(j)=Lnk_Prop
        Msgbox MyArraryLnk(j)
        Browser("Title:=.*").Page("Title:=.*").Frame("Name:="&MyArraryFrm(i)).ChildObjects(Lnk_obj)
        Browser("Title:=.*").Page("Title:=.*").Frame("Name:="&MyArraryFrm(i)).Link("Name:="&MyArraryLnk(j)).Click
    
    Next
Next
Reply
#2
Not Solved
Please don't open multiple threads for the same question. Format your code to get better responses here.
Want to fast track your QTP/UFT Learning? Join our UFT Training Course
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  I want to click on all the links in the webtable. These links are nothing but some co abhideshpande001 0 2,681 07-22-2015, 09:36 AM
Last Post: abhideshpande001
  Having issues getting QTP 10 to recognise an IE frame via DP Critta 6 5,982 08-09-2011, 01:59 PM
Last Post: Critta
  Frame Work venkat369 0 2,449 01-21-2011, 01:54 AM
Last Post: venkat369
  DP for WebSite Frame-WebElement shriqtp 0 2,284 06-11-2009, 10:02 PM
Last Post: shriqtp
  DP For WebSite FRAME shriqtp 0 1,953 06-11-2009, 09:58 PM
Last Post: shriqtp

Forum Jump:


Users browsing this thread: 1 Guest(s)