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
Unable to find few list item in combo field
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Unable to find few list item in combo field
Hi,
Your code looks ok and should work always, expect the ListItem.click().
Please add ListItem.Focus() before you click the item, this line of code ensures that the item is reachable/viewable for Ranorex.
If that doesn't help, could you please post us a Ranorex Snapshot of the combobox and the listitems to check if there are some special items inside the combobox.
How to create a Ranorex Snapshot
Thanks in advance.
Regards,
Peter
Ranorex Team
Your code looks ok and should work always, expect the ListItem.click().
Please add ListItem.Focus() before you click the item, this line of code ensures that the item is reachable/viewable for Ranorex.
If that doesn't help, could you please post us a Ranorex Snapshot of the combobox and the listitems to check if there are some special items inside the combobox.
How to create a Ranorex Snapshot
Thanks in advance.
Regards,
Peter
Ranorex Team
Re: Unable to find few list item in combo field
Hi Peter,
Thanks for your reply. I have added listItem.Focus() now before 'ListItem.Click().
It works fine, I am not getting any more list item not found issue. But I am facing another issue.
I am not able to see the selected listitem in UI, I am always able to see only default value.
My design was, I should be able to select each item from the dropdown and tab out and comeback again to the same field and select another value from the dropdown.
Am I missing something here?
Thanks for your help.
Saha
Thanks for your reply. I have added listItem.Focus() now before 'ListItem.Click().
It works fine, I am not getting any more list item not found issue. But I am facing another issue.
I am not able to see the selected listitem in UI, I am always able to see only default value.
My design was, I should be able to select each item from the dropdown and tab out and comeback again to the same field and select another value from the dropdown.
Am I missing something here?
Thanks for your help.
Saha
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Unable to find few list item in combo field
Hi,
can you please provide us a snapshot file of your application under test?
Following link will show you how to generate such a snapshot file:
http://www.ranorex.com/support/user-gui ... files.html
To track a list item of a combobox you have to use the instant tracking machsnisms of our product.
Have a look at following link, which explains you how instant tracking works:
http://www.ranorex.com/support/user-gui ... html#c3181
Regards
Tobias
Support Team
can you please provide us a snapshot file of your application under test?
Following link will show you how to generate such a snapshot file:
http://www.ranorex.com/support/user-gui ... files.html
To track a list item of a combobox you have to use the instant tracking machsnisms of our product.
Have a look at following link, which explains you how instant tracking works:
http://www.ranorex.com/support/user-gui ... html#c3181
Regards
Tobias
Support Team
Re: Unable to find few list item in combo field
Thanks for your reply.
This issue is fixed now.
This issue is fixed now.