In web applications, we can find the weblist objects in 2 ways.
set col = Browser("index:=0").page("index:=0").object.getElementsByTagName("Select")
msgbox col.length
Please give your inputs, suggestions, feedback to Us about above QTP topic. We value your thoughts. You can write to me at reply2sagar@gmail.com
Please give your inputs, suggestions, feedback to Us about above QTP topic. We value your thoughts. You can write to me at reply2sagar@gmail.com
- using QTP childobjects method
- using html DOM
Set oDesc = Description.Create()
oDesc("micclass").Value = "WebList"
'identify objects inside parent page having micclass as Weblist
set col = ObjParent.childobjects(oDesc)
'print the count of web list boxes on the page.
msgbox col.count
using HTML DOM
msgbox col.length
'Above code will give all objects starting with select tag - list boxes ( Drop downs) .
Please give your inputs, suggestions, feedback to Us about above QTP topic. We value your thoughts. You can write to me at reply2sagar@gmail.com
Please give your inputs, suggestions, feedback to Us about above QTP topic. We value your thoughts. You can write to me at reply2sagar@gmail.com
No comments:
Post a Comment
Please Leave your reply. We value your feedback and inputs