Page 1 of 1

Ranorex does not identify the selected item in a dropdown

Posted: Tue May 22, 2012 6:17 pm
by masticore26
I'm using Windows 7 (SP1) with Ranorex 3.2.3.16825, the project uses Silverlight 5.

I have been trying to add a new action with the recorder, I need to validate a silverlight Dropdown List by asserting the SelectedItemText option.

However, ranorex is showing a different SelectedItemText each time the ChildWindow that contains the Dropdown List is opened, but visually the SelectedItemText is actually the same.

There is no reason for the SelectedItemText to change when the application is relaunched of refreshed as the option shown in the menu is the same one.

Also, as you can see in the image below, all items within the Dropdown List share the same GUID, wich is undesirable but manageable as long as it never changes, but it does, and when it does the test case breaks because I can no longer track the item in the Dropdown List.

You can find the spy snapshot attached to this post.

Re: Ranorex does not identify the selected item in a dropdown

Posted: Wed May 23, 2012 9:46 am
by sham526
U can try

Dim combobox_user As Combobox = Host.Local.FindSingle(Of Combobox)(".//tabpage[@name='Question text']/combobox[2]")
Dim pfid_listitem As Ranorex.ListItem = Nothing
Dim bool As Boolean = combobox_user.TryFindSingle("./listitem[@accessiblename~'(?i:" + Text.ToString + ")']", pfid_listitem)
If bool Then
pfid_listitem.Select()
Delay.Milliseconds(msVSSearchTimeout)
fnSelect_Listitem_combobox = True
End If

Re: Ranorex does not identify the selected item in a dropdown

Posted: Thu May 24, 2012 5:32 pm
by masticore26
Well, the problem is that I don't need to identify an object in the combobox list, what I really need is to assert the SelectedItem Value.

Re: Ranorex does not identify the selected item in a dropdown

Posted: Fri May 25, 2012 2:06 pm
by Support Team
Hi,

You can iterate through the ListItems and check which one is selected, because the attribute "Selected" of the ListItem which is shown in the comboBox is set to true.

Regards,
Markus
Ranorex Support Team

Re: Ranorex does not identify the selected item in a dropdown

Posted: Fri Jan 03, 2014 4:28 pm
by kar.sindhu
I have been trying to automate our company's windows app using Ranorex Recorder.
while recording I click on the combox and do the selection, but while replaying this recorded action it's taking a long time to select the item from the 'List1000'. It sometimes works with great delay and sometimes just timesout, I even tried increasing the timeout value does not help much.

The main problem is that while doing the playback it just sits there saying searching for item 'text' from the 'List1000'. sometimes after 3-4 minutes it gets selected, sometime timesout and fails, I verified the text is there in the 'List1000' still it takes a long time to get it.

Currently we are using the trail version to see if Ranorex will be a good tool for our company. I personally like Ranorex very much except for this combobox select item issue.
Any help will be much appreaciated.

Thanks.

Re: Ranorex does not identify the selected item in a dropdown

Posted: Tue Feb 11, 2014 4:15 pm
by Support Team
Hi,

I am sorry for the slow response!

May I ask you to send us a Ranorex snapshot file of these elements?
This will help us in analyzing the issue!

Thanks,
Markus

Re: Ranorex does not identify the selected item in a dropdown

Posted: Tue Aug 05, 2014 9:02 pm
by laswenson
Hi,

I am currently having the same problem as kar.sindhu. Was a solution found for this?

Thanks

Re: Ranorex does not identify the selected item in a dropdown

Posted: Thu Aug 07, 2014 1:29 pm
by Support Team
Hi laswenson,

Unfortunately we did not get an email from kar.sindhu.

May I ask you to send a Ranorex Snapshot or a sample to [email protected]?

This will help us to find a possible solution.

Regards,
Markus (S)