WPF Combobox not usable anymore with Improved WPF Plugin

Bug reports.
Michael Freimann
Posts: 2
Joined: Tue Jan 23, 2018 10:19 am

WPF Combobox not usable anymore with Improved WPF Plugin

Post by Michael Freimann » Tue Jan 23, 2018 10:43 am

After having lots of speed and reliability issues with the legacy WPF plugin we decided trying to upgrade to the new improved WPF plugin.
I set the setting to "WpfImprovedOnly" and updated some of our repository items that I can start testing. We have a login form element with the type ComboBox in which we choose a specific user. Until now we could do that by using the following code:

Code: Select all

combobox.Click();
var item = combobox.FindSingle<ListItem>($".//listitem[@text='{textToSelect}']");
item.Click();
With the new improved WPF plugin that doesn't work anymore. Neither does the code work, nor does any underlying element exist nor can I see anything in the Spy (even with open ComboBox drop down state).

How will I be able to select a specific entry from the ComboBox with "WpfImprovedOnly"? I even can't use the UIAutomation element as a workaround as it's deactivated with "WpfImprovedOnly". :(

Michael

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

Re: WPF Combobox not usable anymore with Improved WPF Plugin

Post by odklizec » Wed Jan 24, 2018 8:10 am

Hi,

Please post a Ranorex snapshot (not screenshot) of the problematic element. There is unfortunately nothing anyone here can do or suggest without (at very least) Ranorex snapshot. But I guess, Ranorex folks will need also a small sample app or remote session with you to be able to determine what's wrong. So I would suggest to contact them directly via support form available here...
https://www.ranorex.com/support/support-query.html
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

Michael Freimann
Posts: 2
Joined: Tue Jan 23, 2018 10:19 am

Re: WPF Combobox not usable anymore with Improved WPF Plugin

Post by Michael Freimann » Thu Jan 25, 2018 10:29 am

Well, I though it's a standard combobox in WPF. Everyone with .NET can build a sample app for that.
I think the snapshot could have helped as I found something:
With the legacy WPF plugin, the content of the dropdown menu of the combobox was inside the combobox element itself, see Attachment "Legacy WPF Plugin Spy.PNG"
With the improved WPF plugin, the content of the dropdown menu of the combobox is at a different location. It's in the system root under your computer directly, see Attachment "Improved WPF Plugin Spy.png"

Anyway thank your the tip with the support, I also asked them. Maybe it's a bug as it's stupid to put the opened dropdown menu into the root of the system instead of inside the combobox element.

Greetings
Michael
Attachments
Improved WPF Plugin Spy.png
Improved WPF Plugin Spy.png (12.36 KiB) Viewed 461 times
Legacy WPF Plugin Spy.PNG
Legacy WPF Plugin Spy.PNG (9.75 KiB) Viewed 461 times

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

Re: WPF Combobox not usable anymore with Improved WPF Plugin

Post by odklizec » Thu Jan 25, 2018 10:39 am

Well, It's probably not a bug but standard (and expected) behavior? ;) I saw many apps (including browsers) behaving like this, i.e. content of combo boxes and context menus displayed outside the AUT (in tree root). I guess it's something system-related? But I agree, it looks weird. In any case, legacy and improved xpaths are not compatible, so if you want to use "Improved" mode only, you must update existing xpaths. Otherwise, you must use Legacy mode.
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

Jugaadi-ram
Posts: 2
Joined: Tue Jul 03, 2018 11:55 am

Re: WPF Combobox not usable anymore with Improved WPF Plugin

Post by Jugaadi-ram » Thu Jul 05, 2018 6:43 am

Hi Ranorex Team
I was having the same problem as Micheal, Namely the children of Combo-boxes are not under the combo box but outside the folder of SUT.
Would there be an update/change to Ranorex which might include the List Items of combo box under the Parent combo box, similar to what Micheal said it used to be earlier.

Currently any combo box for which the number of child list items are known can be used fine but in my SUT the number of children in the same combo box varies with some menu options for that i could not figure out how should I approach. I am open to suggestion, Thanks in advance.

A little house-keeping thing, the Ranorex help window is not working properly. It keeps minimizing for no reason and is irritating for use, maybe there is a bug could you please look into it.
J-r

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: WPF Combobox not usable anymore with Improved WPF Plugin

Post by Support Team » Mon Jul 09, 2018 5:25 pm

Hi Jugaadi-ram,

As odklizec stated in a previous reply, this is standard/expected in most environments. Combo box drop-down menus are usually drawn by the system, not the application, therefore it is expected to show as a child of the host node (typically as a contextmenu item). You may need to first expand the combo box since the contextmenu and its items often don't exist until it is expanded.

Depending on the technology and application, sometimes we can get the list of selectable items without having to expend the combo box (see picture below), but not always. If you are able to provide a Ranorex Snapshot of the specific combo box you are troubleshooting, I can take a closer look.
1.png
1.png (2.49 KiB) Viewed 193 times
Regarding the help window issue, since this is not related, do you mind making a new forum thread or submitting a support query. This will help keep our troubleshooting efforts and communication more organized. Thank you in advance!

Kind Regards,
Ned
.
Image