Ranorex Spy can't derive ToolWindow XPath on certain machine

Ranorex Spy, Recorder, and Studio.
Craig
Posts: 9
Joined: Thu Nov 04, 2010 8:43 pm

Ranorex Spy can't derive ToolWindow XPath on certain machine

Post by Craig » Wed Nov 17, 2010 7:41 am

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

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

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

Post by Support Team » Wed Nov 17, 2010 12:54 pm

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
.
Image

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

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

Post by Craig » Wed Nov 17, 2010 9:14 pm

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?

User avatar
Ciege
Ranorex Guru
Posts: 1335
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

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

Post by Ciege » Wed Nov 17, 2010 11:26 pm

So have you tried with the 64bit version of RanorexSpy on the 64bit machine? It may just make a difference for you...
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...