Thread Rating:
  • 2 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How To Find Dropdown Object based on Values from the dropdown list
#8
Solved: 11 Years, 3 Months, 3 Weeks ago
ExpectedResult="London"
'allitems=Window("Flight Reservation").WinComboBox("Fly From:").GetROProperty("all items:=DenverFrankfurtLondonLosAngelesParisPortlandSan FranciscoSeattleSydneyZurich")
Itemscount=Window("Flight Reservation").WinComboBox("Fly From:").GetROProperty("all items")
MsgBox Itemscount
result=Split(Itemscount,";")
For i = 0 To UBound(result) 
currentitem=Window("Flight Reservation").WinComboBox("Fly From:").GetItem(i)
MsgBox currentitem
If currentitem=ExpectedResult Then
    MsgBox "expected item exists in WebList"
else
MsgBox "expected item Not exists in WebList"
Window("Flight Reservation").WinComboBox("Fly From:").Select ExpectedResult
Exit for
End If
    
Next
Reply


Messages In This Thread
RE: How To Find Dropdown Object based on Values from the dropdown list - by Vijay Kumar - 10-18-2016, 07:23 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  how to select value from google search box dropdown +QTP prajyot 0 2,897 06-28-2017, 06:30 PM
Last Post: prajyot
  Trying to create List box in excel sheet at Run time with values yes No JACKSPARROW 0 1,707 01-17-2017, 11:05 AM
Last Post: JACKSPARROW
  General Object Error(Find Object Error) akhandesh 1 3,597 02-24-2016, 01:05 PM
Last Post: sindhus
  Compare second web list value according to the first web list value roselin6 1 2,838 10-07-2015, 09:14 PM
Last Post: supputuri
  Problem selecting in a dropdown menu during playback. qemls29 9 13,029 07-28-2015, 05:44 PM
Last Post: Sharan

Forum Jump:


Users browsing this thread: 1 Guest(s)