Page 1 of 1

WPF Combobox not usable anymore with Improved WPF Plugin

Posted: Tue Jan 23, 2018 10:43 am
by Michael Freimann
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

Re: WPF Combobox not usable anymore with Improved WPF Plugin

Posted: Wed Jan 24, 2018 8:10 am
by odklizec
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

Re: WPF Combobox not usable anymore with Improved WPF Plugin

Posted: Thu Jan 25, 2018 10:29 am
by Michael Freimann
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

Re: WPF Combobox not usable anymore with Improved WPF Plugin

Posted: Thu Jan 25, 2018 10:39 am
by odklizec
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.

Re: WPF Combobox not usable anymore with Improved WPF Plugin

Posted: Thu Jul 05, 2018 6:43 am
by Jugaadi-ram
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

Re: WPF Combobox not usable anymore with Improved WPF Plugin

Posted: Mon Jul 09, 2018 5:25 pm
by Support Team
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
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