Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Web List Selection
#2
Not Solved
Hi,
In such a case I would go about like this:

Code:
Dim aArray, sArrayItem, nArrayIndex, oBrowserPage, oNewWindow
Set oBrowserPage = Browser("Google").Page("Search")
'Store all items in weblist into an array separated by semi-colon (;)
aArray = oBrowserPage.WebList("lstSampleWebList").GetROProperty("all items")
'Split Weblist items and store in string variable
sArrayItem = Split(aArray,";")
'Run loop until all items have been selected in weblist or exit do statement is executed when value is found
'nArrayIndex=0
Do While nArrayIndex < UBound(aArray)
'Select item in WebList
oBrowserPage.WebList("lstSampleWebList").Select sArrayItem(nArrayIndex)
'Insert code below for the link you want to click after item selection in weblist
oBrowserPage.Link("lnkSampleLink").Click
'New Window opens, set it into an object
oNewWindow = Browser("NewWindow").Page("SearchPage")
'Search your value in the new window
oNewWindow.WebEdit("txtSearchBox").Set sArrayItem(nArrayIndex)   'Value to be searched/looked for. I'm assuming a search box is there.
'Click search button/link
oNewWindow.Link("SearchButton").Click
If oNewWindow.WebEdit("txtValueFound").GetROProperty("text") = sArrayItem(nArrayIndex) Then
'Value found. Show message box and exit Do-While block
msgbox "Value found!"
Exit Do
Else
'Value not found. Close new window and continue loop
oNewWindow.Close
End If
'Increment Array Index so that weblist can select next item.
nArrayIndex = nArrayIndex + 1
End Do

I hope it helps and is understandable.
Reply


Messages In This Thread
Web List Selection - by mhanaan - 11-23-2012, 05:10 AM
RE: Web List Selection - by imzeeshan - 11-24-2012, 03:30 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Windows Application Custom Combo box selection change event not firing in uft RamUFT 0 833 02-06-2020, 08:10 AM
Last Post: RamUFT
  Handling Web list running Jquery Divya Srivastava 1 1,354 09-07-2018, 08:42 PM
Last Post: Ankur
  Compare second web list value according to the first web list value roselin6 1 2,658 10-07-2015, 09:14 PM
Last Post: supputuri
  SparkDropdownList value Selection Issue DivyaKurup 2 3,215 08-14-2012, 09:42 AM
Last Post: souvikghosh_diatm
  Testing field visibility based on checkbox selection anthony1carr 1 2,468 04-03-2012, 09:37 AM
Last Post: sshukla12

Forum Jump:


Users browsing this thread: 1 Guest(s)