Micro Focus QTP (UFT) Forums
weblist values to display with help of datatable or msgbox - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Interview Questions (https://www.learnqtp.com/forums/Forum-UFT-QTP-Interview-Questions)
+--- Thread: weblist values to display with help of datatable or msgbox (/Thread-weblist-values-to-display-with-help-of-datatable-or-msgbox)



weblist values to display with help of datatable or msgbox - kanna79 - 12-18-2009

Hi ,
Here is a code which says how many weblist are there in a page and also count the items in weblist. I want to know how i should retrive the states name and display them in a msgbox or export to datatable.
Code:
Dim cntweblist,cnt.
Set WinListDesc=description.Create()
WinListDesc("html tag").value="SELECT"

set cntweblist=Browser("name:=iGoogle").page("title:=iGoogle").ChildObjects(WinListDesc)
msgbox "No. of WedList:" & vbnewline &cntweblist.count
cnt=Browser("iGoogle").Page("iGoogle").WebList("select").GetROProperty("items count")
msgbox "NO of items in weblist is:"&cnt

and also how to use webtables with help of DP with an example.
Thanks in Advance.
email: vuru_kavi@yahoo.com


RE: weblist values to display with help of datatable or msgbox - satan - 12-21-2009

Code:
dim myarr
myItems=Browser("iGoogle").Page("iGoogle").WebList("select").GetROProperty("all items")
myarr=split(myItems,";")
iterate the array and get the values of a weblist.


RE: weblist values to display with help of datatable or msgbox - bfakruddin - 12-22-2009

I didn't get your question... With the help of DataTable or msgbox... What it means?

Validating the data in datatable in WebList? or what?