Unable to find few list item in combo field : Object Identification and Technologies

Unable to find few list item in combo field

Technology specific object identification, supported applications, web technologies, and 3rd party controls.

Unable to find few list item in combo field

Postby Saha » Thu Apr 07, 2011 11: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
Saha
 
Posts: 39
Joined: Tue Mar 01, 2011 7:20 pm

Re: Unable to find few list item in combo field

Postby Support Team » Fri Apr 08, 2011 7:31 am

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
User avatar
Support Team
Site Admin
 
Posts: 4845
Joined: Fri Jul 07, 2006 5:30 pm
Location: Graz, Austria

Re: Unable to find few list item in combo field

Postby Saha » Fri Apr 08, 2011 5:29 pm

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
Saha
 
Posts: 39
Joined: Tue Mar 01, 2011 7:20 pm

Re: Unable to find few list item in combo field

Postby Support Team » Mon Apr 11, 2011 1:33 pm

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
User avatar
Support Team
Site Admin
 
Posts: 4845
Joined: Fri Jul 07, 2006 5:30 pm
Location: Graz, Austria

Re: Unable to find few list item in combo field

Postby Saha » Thu Apr 14, 2011 4:08 pm

Thanks for your reply.
This issue is fixed now.
Saha
 
Posts: 39
Joined: Tue Mar 01, 2011 7:20 pm


Return to Object Identification and Technologies

Who is online

Users browsing this forum: No registered users and 0 guests

cron