10-07-2016, 12:23 AM
ExpectedResult="Sales"
ItemCount=Browser("OrangeHRM").Page("OrangeHRM_2").WebList("leaveList[cmbSubunit]").GetROProperty("all items")
itensplit=split(ItemCount,";")
For i = 1 To UBound(itensplit) Step 1
actualResult=Browser("OrangeHRM").Page("OrangeHRM_2").WebList("leaveList[cmbSubunit]").GetItem(2)
If actualResult=ExpectedResult Then
MsgBox "Elemet Found"
Browser("OrangeHRM").Page("OrangeHRM_2").WebList("leaveList[cmbSubunit]").Select "Sales"
Exit for
End If
Next
ItemCount=Browser("OrangeHRM").Page("OrangeHRM_2").WebList("leaveList[cmbSubunit]").GetROProperty("all items")
itensplit=split(ItemCount,";")
For i = 1 To UBound(itensplit) Step 1
actualResult=Browser("OrangeHRM").Page("OrangeHRM_2").WebList("leaveList[cmbSubunit]").GetItem(2)
If actualResult=ExpectedResult Then
MsgBox "Elemet Found"
Browser("OrangeHRM").Page("OrangeHRM_2").WebList("leaveList[cmbSubunit]").Select "Sales"
Exit for
End If
Next