Page 1 of 1

Ranorex Spy can't derive ToolWindow XPath on certain machine

Posted: Wed Nov 17, 2010 7:41 am
by Craig
I have a WPF application that uses Actipro's ToolWindows with tabbed containers. For a test I've written, I made a Ranorex recording that selects a tab in one of the ToolWindowContainers and then selects a row in a WPF DataGrid that's in the selected toolwindow. When playing the recording on my dev box, it works great.

However, when I tried running the same recording on my build machine (used primarily for nightly builds and checkin testing), Ranorex fails to find the control that's in the selected ToolWindow.

The XPath on my dev box is:
/form[@automationid='mainWindow']/container/container[4]/container[@automationid='packageVariablesWindow']/element/table[@automationid='variablesGrid']

However, when using Ranorex Spy on my build machine, I only get an XPath of /form[@automationid='mainWindow']/container/container[4].

I get this wrong path regardless of where I press Ctrl+LWin within the ToolWindow. Note that the XPath doesn't even include the tool window itself (which is container[@automationid='packageVariablesWindow'] in the working XPath).

Interestingly, if I undock and redock the tab container, then Ranorex Spy correctly identifies the XPath to the ToolWindow's DataGrid.

Does anyone have an idea as to why Ranorex can discern the XPath on my dev machine but not on my build machine?

Thanks,

-Craig

Re: Ranorex Spy can't derive ToolWindow XPath on certain machine

Posted: Wed Nov 17, 2010 12:54 pm
by Support Team
Hi,

we think that the problem is dependent of the uiautomation framework from Microsoft. We've had problems with this framework time and time again, because it is not the best. We are working on an own plug-in, which is more comfortable than the Microsoft's one.
Which operating systems do you use on both, the dev and the build machine.
Maybe this is the crux of the matter, because the framework may work different on different operating systems.

Regards,
Tobias
Support Team

Re: Ranorex Spy can't derive ToolWindow XPath on certain machine

Posted: Wed Nov 17, 2010 9:14 pm
by Craig
My dev box uses Windows 7 Ultimate 32-bit with .NET 4.0 installed. The build box uses Windows 7 Ultimate 64-bit with .NET 4.0 installed.

Another interesting point is that the application has another ToolWindowContainer that only contains 2 ToolWindows. The top ToolWindow contains a few controls that Ranorex handles correctly on both my dev box and the build box. Is it possible that the number of ToolWindows in a container is a factor here, or could that just be coincidence?

Re: Ranorex Spy can't derive ToolWindow XPath on certain machine

Posted: Wed Nov 17, 2010 11:26 pm
by Ciege
So have you tried with the 64bit version of RanorexSpy on the 64bit machine? It may just make a difference for you...