Hi,
I have some buttons in my AUT that will display tooltips on mouseover. When creating a recorded module, I will click the button and perform subsequent steps, however, when replaying this module, the button cannot be found.
When I use Ranorex Spy to check the path, the button element has been replaced by a tooltip element. Since the tooltip isn't present when replaying the module, the module fails.
Here's what Spy looks like when capturing the button:
And here's what it looks like when I go back in to see why I can't find the button:
My AUT has a lot of buttons with tooltips, and this is causing me a problem with writing test cases. I've attached snapshots for both the button and the tooltip captures.
If someone could let me know if I'm doing something wrong, or how to get around this problem, that would be great.
Trouble replaying recording module for buttons with tooltips
Trouble replaying recording module for buttons with tooltips
- Attachments
-
- Ranorex Snapshots.7z
- (1005.96 KiB) Downloaded 6 times
Last edited by rbell on Fri Jul 05, 2019 1:23 am, edited 1 time in total.
Re: Trouble replaying recording module for buttons with tooltips
Hi,
Please upload a Ranorex snapshot of the AUT and failing xpath (as you have it stored in repository). Screenshot is unfortunately useless for UI evaluation. Ideally, please post also the snapshot with displayed tooltip. You can use Instant Tracking feature (see user guide) to capture the tooltip element.
Please upload a Ranorex snapshot of the AUT and failing xpath (as you have it stored in repository). Screenshot is unfortunately useless for UI evaluation. Ideally, please post also the snapshot with displayed tooltip. You can use Instant Tracking feature (see user guide) to capture the tooltip element.
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
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
Re: Trouble replaying recording module for buttons with tooltips
Edited to attach the snapshot file - not sure why it didn't upload on original submission.
Re: Trouble replaying recording module for buttons with tooltips
Please post also the failing xpath, as you have it stored in repository. Thanks.
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
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
Re: Trouble replaying recording module for buttons with tooltips
Failing path is:
'container[@controlname='uiBackground']//container[@controlname='gbBackground']/?/?/[email protected]='uiTabPageStockAllocation']/?/?/element[@controlname='LeftRebar2']/?/?/[email protected]='CommandBarTools']/button[@accessiblename='Allocate']'
'container[@controlname='uiBackground']//container[@controlname='gbBackground']/?/?/[email protected]='uiTabPageStockAllocation']/?/?/element[@controlname='LeftRebar2']/?/?/[email protected]='CommandBarTools']/button[@accessiblename='Allocate']'
Re: Trouble replaying recording module for buttons with tooltips
Hi,
Well, this is really weird. It really looks as if tooltip replaces the button? But if the xpath is corrected, it points to the toolbar button, despite it identifies itself as tooltip?
Here is the xpath, which should work both with button and tooltip. At least, it finds the 'button'
The question is, if click on such 'tooltip-like-button' element, will work like click on standard button? Just give it a try...
Well, this is really weird. It really looks as if tooltip replaces the button? But if the xpath is corrected, it points to the toolbar button, despite it identifies itself as tooltip?


Anyway, I think it's something caused by Janus UI CommandBar, used in your app, rather than Ranorex bug? But you should definitely try to update somewhat buggy 9.0.0, you are using now, with much more stable 9.1.0! And if 9.1.0 behaves the same, I would suggest to contact Ranorex support (via support form) and provide them with your app, or a small sample app, featuring such toolbar. They may either find what's wrong in Ranorex or confirm a problem with Janus UI component./form[@controlname='DataForm']//form[@controlname='DataForm']/container[@controlname='uiBackground']//container[@controlname='gbBackground']/?/?/container[@controlname='uiTabPageStockAllocation']/?/?/element[@controlname='LeftRebar2']/?/?/toolbar[@accessiblename='CommandBarTools']/*[@accessiblename~'Allocate']
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
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
Re: Trouble replaying recording module for buttons with tooltips
Thanks very much for your reply! The updated path you posted worked. It does appear that the tooltip acts like a button, which is weird!
- Support Team
- Site Admin
- Posts: 12002
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Graz, Austria
Re: Trouble replaying recording module for buttons with tooltips
Hi everyone,
The customer did make a support ticket on this issue which I have paraphrased my findings below in case someone else encounters this issue.
Ned
The customer did make a support ticket on this issue which I have paraphrased my findings below in case someone else encounters this issue.
Cheers,Since this element has an MSAA accessibility layer, Ranorex utilizes this for object recognition via our MSAA plugin. To troubleshoot this issue, I used an application called Inspect.exe. This is a debug tool created by Microsoft to read MSAA attributes on elements, similar to Ranorex’s MSAA plugin.
Using Inspect.exe, we see the same behavior, which confirms this is an issue with the Janus element changing the MSAA element type to a tooltip and not back to a button when the tooltip disappears. I recommend filing a bug with the developers of this element to correct this behavior. I have also linked Inspect.exe below if you wish to verify this in your environment as well.
Inspect.exe - Before showing tooltip: Inspect.exe - After showing tooltip (but no longer showing tooltip): Inspect.exe: https://upload.ranorex.com/s/ae63Ej8cjNgiw7P Since this is an issue with the Janus element, we can only work around this issue on our end. The RxPath provided by Pavel in the forums is the best workaround available at this time (copied below). This RxPath will work no matter the element type as long as the accessiblename always contains ‘Allocate’ for both the button and the tooltip element.
./toolbar[@accessiblename='CommandBarTools']/*[@accessiblename~'Allocate']
Ned