10-18-2016, 07:23 PM
(This post was last modified: 10-18-2016, 07:24 PM by Vijay Kumar.)
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
'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