Quality Testing

Quality is delighting customers

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:
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")
Msgbox MyArraryLnk(j)


Views: 174

Reply to This

Replies to This Discussion

Frame is just for visual representation.  For QTP it does't matter.  You should be able to click on first link (irrespective of frame) by providing its name.


TTWT Magazine





© 2021   Created by Quality Testing.   Powered by

Badges  |  Report an Issue  |  Terms of Service