Unable to find few list item in combo field
Posted: Thu Apr 07, 2011 10:19 pm
Hi,
I have these code to select values from a dropdown. It works perfectly in most of the cases. Only failing for certain items . I am able to see these items in the dropdown, but not sure why ranorex is not able to find.
I have also noticed that missing item in the 2nd item in the dropdown list.
Please help.
Here is my code
-------------
isElementFound = webDoc.TryFindSingle(".//select[@id~'.*" & elementName & "$']", Adapter.DefaultSearchTimeout, element)
If (isElementFound) Then
element.Click
isLookupFound = Host.Local.TryFindSingle("/container[@caption='selectbox']/listitem[@accessiblename='" & lookupItem & "']", Adapter.DefaultSearchTimeout, item)
If (isLookupFound) Then
item.Click
Keyboard.Press("{Tab}")
Else Report.Failure("Combo value not found."&lookupItem)
End If
Else Report.Failure("Element not found :" &fieldName)
End If
I have these code to select values from a dropdown. It works perfectly in most of the cases. Only failing for certain items . I am able to see these items in the dropdown, but not sure why ranorex is not able to find.
I have also noticed that missing item in the 2nd item in the dropdown list.
Please help.
Here is my code
-------------
isElementFound = webDoc.TryFindSingle(".//select[@id~'.*" & elementName & "$']", Adapter.DefaultSearchTimeout, element)
If (isElementFound) Then
element.Click
isLookupFound = Host.Local.TryFindSingle("/container[@caption='selectbox']/listitem[@accessiblename='" & lookupItem & "']", Adapter.DefaultSearchTimeout, item)
If (isLookupFound) Then
item.Click
Keyboard.Press("{Tab}")
Else Report.Failure("Combo value not found."&lookupItem)
End If
Else Report.Failure("Element not found :" &fieldName)
End If