Ranorex fails to derive XPaths for contents of tab controls

Bug reports.
Craig
Posts: 9
Joined: Thu Nov 04, 2010 8:43 pm

Ranorex fails to derive XPaths for contents of tab controls

Post by Craig » Thu Jan 06, 2011 8:42 pm

We have a WPF application that uses Actipro's Docking & MDI component, which allows us to have tool windows that contain tab controls, exactly like how you have Error and Output tabs in the same tool window in Ranorex Studio. When doing a recording with Ranorex 2.3.6, or using Ranorex Spy, we're seeing that Ranorex will identify XPaths within the first (aka left-most) tab control in each tool window. However, when I select another tab in the same tool window, I can't get any XPaths for the controls within the tab. This is a blocking problem for us, as many of our tests require the use of several of our application tabs. Furthermore, considering that Ranorex can reliably detect controls in the first tab for each tool window, it seems like this is an odd Ranorex bug where it fails to process the additional tabs.

In Ranorex Spy, the ToolWindow itself is listed as a Container in Ranorex Spy, and each tab is a child Container of the Tool Window. All of the tabs have child nodes for their picture and text, but only one has an additional child Container that contains the XPaths for its contents.

How can we workaround this and/or get a bug fix for this issue? Please don't hesitate to contact me with questions.

Thanks,

-Craig

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Ranorex fails to derive XPaths for contents of tab controls

Post by Support Team » Fri Jan 07, 2011 1:54 pm

In general, Ranorex correctly identifies WPF tab pages very well, in particular if you use the default TabControl delivered with the .NET Framework. This might be a problem specific to this TabControl.
Could you provide us a Ranorex Snapshot (see this link how to create it) and a sample application that we can reproduce the problem with? Thanks!

Regards,
Alex
Ranorex Team

Craig
Posts: 9
Joined: Thu Nov 04, 2010 8:43 pm

Re: Ranorex fails to derive XPaths for contents of tab controls

Post by Craig » Fri Jan 07, 2011 8:09 pm

I've attached a zip file that contains a sample application, a sample RanorexStudio application, a ranorex snapshot, and a summary file describing what I'm seeing.

Thanks,

-Craig
You do not have the required permissions to view the files attached to this post.

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Ranorex fails to derive XPaths for contents of tab controls

Post by Support Team » Mon Jan 10, 2011 2:52 pm

Hi,

it looks like the implementation of the UI Automation of the library you are using is not done very fine.
We've also tried to analyze your user interface with Microsofts UISpy which brought us to the same result as we got with our Product. It seems like the Actipro controls are owner-drawn and that there is something messed up in the UI Automation implementation. Consequently, there is currently nothing we can do from our side to improve the recognition of these tab controls, sorry! As a customer of Actipro you should contact them directly and ask them to improve the UI Automation support for these controls.

As a workaround, try setting the AutomationProperties of the tab controls, e.g. AutomationProperties.HelpText, to the actual values you want to get from the control. These properties should then by shown in Ranorex Spy.

Regards,
Tobias
Support Team