List from combobox not appearing correctly

Bug reports.
BSullivan
Posts: 29
Joined: Thu Jun 04, 2015 6:31 pm
Location: HorseHeads NY
Contact:

List from combobox not appearing correctly

Post by BSullivan » Tue Mar 28, 2017 1:58 pm

I am having an issue with a specific combo box in my AUT. When certain conditions are met (settings in the AUT) Ranorex appears to improperly read the contents of the list contained within that combo box.

Here is a snapshot of the "List" that comes from the combobox, notice the screenshot and the discrepancy between the contents.
ComboIssues.rxsnp
Snapshot of the rendered list
(18.74 KiB) Downloaded 34 times
The list items that Ranorex is listing here, are actually valid items from a separate combobox in the same dialog. The one in Red is the misbehaving one and the one in blue is where the data is coming from (one of those 2 anyway)
Offending_Dialog.png
Dialog containing the combo
Offending_Dialog.png (28.05 KiB) Viewed 971 times
Here is a snapshot of this dialog to maybe help narrow this down.
Dialog_Snapshot.rxsnp
Snapshot of the dialog
(58.86 KiB) Downloaded 36 times
I am thoroughly confused as the list that is available in the snapshot and visible in the spy (as a static child of the combo) look correct. I do not understand how this is being mixed up.

Any ideas?

Specs:
Ranorex 6.2.1
Windows 10 Physical Machine
Windows 10 VMS

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3932
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: List from combobox not appearing correctly

Post by odklizec » Tue Mar 28, 2017 2:14 pm

Hi,

I guess that the problem is caused by the fact the controlID of all mentioned comboboxes is the same ('1000'). I think you must change the control ID (in GUI) for each List element with a unique number?
Attachments
List_id.png
List_id.png (36.3 KiB) Viewed 969 times
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

BSullivan
Posts: 29
Joined: Thu Jun 04, 2015 6:31 pm
Location: HorseHeads NY
Contact:

Re: List from combobox not appearing correctly

Post by BSullivan » Tue Mar 28, 2017 2:57 pm

Thanks for the idea. It is something that I have thought about, but I don't think that the IDs of the lists are the issue. The "List 1000" ID is reused in every combo box in the AUT, there are multiple other dialogs that contain a larger number of combo boxes all with that same structure, but only this dialog has an issue.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3932
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: List from combobox not appearing correctly

Post by odklizec » Wed Mar 29, 2017 7:38 am

Yeah, you may be right. A non-unique ID should not be a cause of this problem. At worst case, Ranorex should identify multiple combo boxes.

If the problem happens with only this particular dialog, then I guess it's something caused by the dialog itself, I mean its programming? It seems to me as as if the combo box, when expanded, somehow displays correct list, but in the background, there is something messed up? Are you sure that if you select an item in expanded combo box, that the outcome of dialog is correct?
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

User avatar
Stub
Posts: 173
Joined: Fri Jul 15, 2016 1:35 pm

Re: List from combobox not appearing correctly

Post by Stub » Wed Mar 29, 2017 8:50 am

My AUT also has ComboBox drop-Lists all with a control ID of 1000. I had assumed it was a Windows default ID so outside of our ability to control.

BSullivan
Posts: 29
Joined: Thu Jun 04, 2015 6:31 pm
Location: HorseHeads NY
Contact:

Re: List from combobox not appearing correctly

Post by BSullivan » Wed Mar 29, 2017 1:35 pm

When an Item is selected from this combobox, the outcome of the dialog is correct. At this point I have tested that to death. The issue that I cannot get around is that when interacting with the combo in question, Ranorex cannot scroll to and click on an item that is contained in the background list.

If I use the ListItem.Select() option, a viable and correct option is chosen, but this method does not fire off the event handlers in the dialog, as they are looking for click events. If I try and choose a listitem that is in the background list and ListItem.Click() after clicking the combobox, the mouse moves to the very top left corner and clicks on nothing...

qwertzu
Posts: 178
Joined: Wed Jan 25, 2017 11:08 am

Re: List from combobox not appearing correctly

Post by qwertzu » Fri Mar 31, 2017 11:51 am

Hi BSullivan,

I still think, the reason for this issue is the control ID.
Have you already tried to identify the combo box via some other attribute?

Please try to use the following path:
/form[@title='Crosstab Setup']//list[@accessiblename='Business Day Table']

When I enter it, I get the listItems you were looking for. (see screenshot)

regards,

qwertzu
Attachments
listItems.png
listItems.png (22.79 KiB) Viewed 913 times

BSullivan
Posts: 29
Joined: Thu Jun 04, 2015 6:31 pm
Location: HorseHeads NY
Contact:

Re: List from combobox not appearing correctly

Post by BSullivan » Tue Apr 18, 2017 9:33 pm

Sorry for the late reply.

Getting the correct list of items is not the issue, selecting them from the listbox that populates when the combobox is clicked is. The list is correct in the background and my test is picking a random one to select properly, but the items that appear when the combobox is clicked don't match that list.

In a week or so, I will be upgrading to Ranorex 7.0 to see if this fixes the issue.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3932
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: List from combobox not appearing correctly

Post by odklizec » Wed Apr 19, 2017 7:36 am

Hi,

I don't think that the Ranorex 7 will fix the problem. It seems to me, that the issue is caused by the way you are interacting with the combo. I think you must first expand the combo and only then use Click method on the appropriate item? Eventually, I would suggest to add an additional EnsureVisible event before the click action. Sure, Click event alone usually does EnsureVisible (if not disabled) before the click, but sometimes, it's better to add an additional one before the click.

Unfortunately, without seeing the exact sequence of actions, exact xpaths (plus actual snasphot of both expanded and collapsed combo), there is not much anyone else here can do or suggest. Ideally, it would be nice to see a small sample app with the problematic elements (not necessarily the production one).
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration