Page 1 of 1

Unable to validate Tooltip for Error Validations

Posted: Fri Mar 15, 2019 2:47 pm
by nagamahesh@123
We are working on Ranorex version 8.2.1. We test a desktop application developed using c# and WPF.
I need to validate tooltip text on the error provider, but I am unable to capture the text value of tooltip.
We have tried using instant tracking, and then while NOT moving the mouse and the tooltip is still present, hit the ScrollLock key to create a SnapShot of the current state.
Still was unable to capture the tooltip text. Please guide through this.

Re: Unable to validate Tooltip for Error Validations

Posted: Mon Mar 18, 2019 8:33 am
by odklizec
Hi,

As mentioned in your other post, Ranorex 8.2.1 is too old and no longer supported. Please try to reproduce your problem with 8.3.3 or 9.0.

Also, while doing instant tracking, were you able to see some tooltip details in Spy (without saving snapshot)? If the text in tooltip is not recognizable by Ranorex, then you may be out of luck. Unfortunately, it's impossible to suggest something without seeing the snapshot. Have you tried to save the snapshot directly from recording? Simply, if you are able to track the tooltip (with instant tracking), save the xpath to tooltip to repo. Then add Create Snapshot action to recording of your choice (after an action, which invokes the tooltip) and try to run it. If the tooltip is shown and recognizable by Ranorex, It should be possible to save the snapshot as well.

Re: Unable to validate Tooltip for Error Validations

Posted: Tue Jun 04, 2019 6:13 pm
by arthur.martinez
Hi, I'm having the same issue as: nagamahesh@123, the infamous tool tip.
Ranorex: 9.0.1
For me, in my program I have to hover over a string hyperlink and a tool tip appears. Now if I make any movements, say on the keyboard, or I move the mouse, the tool tip disappears. But as long as I remain hovering over the hyperlink string the tool tip will remain. I'm supposed to verify the tooltip appears. Now, I was asked to use Sikuli to take create image verification, but I'm not too crazy about Sikuli, I'd prefer using Ranorex, since we are paying for it after all :D . I've attached an image of the tool tip I'm trying to verify; when I open the Ranorex Spy/Track I don't see on there. There has to be a way to verify this tool tip, without using Sikuli. Again, if I tap any keys on my keyboard or move the mouse the tool tip disappears. The only way I was able to take an image of it was using Greenshot and modified to slow down so I can capture the tool tip. Any help is greatly appreciated. Otherwise, I have to use Sikuli :| .

Thanks...

Re: Unable to validate Tooltip for Error Validations

Posted: Tue Jun 04, 2019 8:30 pm
by Support Team
Hi Arthur,

I will be happy to help with this! As you suspect, this is pretty tricky to get. Without knowing more about your application and environment, it is hard to advise exactly how to validate this tool tip. To help with this, try capturing a system-wide Ranorex Snapshot by running the following line of code in a new Ranorex code module.

Code: Select all

Report.Snapshot("/");
As soon as you start running this code module, quickly move the mouse to create the tool tip and then keep the mouse still until the snapshot is finished generating. Once generated, please upload the resulting snapshot here (located in the output directory, file ending in *.rxsnp)

If it ends up there is no object recognition on this tool tip, I can help with using image-based validation in Ranorex. There is no need to use another tool when Ranorex can do it all :D.

Cheers,
Ned

Re: Unable to validate Tooltip for Error Validations

Posted: Wed Jun 05, 2019 6:21 pm
by arthur.martinez
Support team thank you so much for your help, with that method it did help! Thanks Again.
Now with that being said, I'm going to post what I did to get the element for that tool tip (to help others):

Keep in mind that this tool tip will only appear if a user hovers over it and if the user moves the mouse or touches any keys the tool tip disappears:
1. Within my test I created : 1. Add new Action. 2. User code 3. New User code method.
2. When the User Code is added, name the method, then it will appear in _your_testname_UserCode.cs file
3. public void ScreenCapture()
{
Report.Snapshot("/");
}
4. You are set, so what I did to capture it, was in my Recording I:
4a. Did a Mouse "Move" to the area where the text is that causes the tool tip to appear.
4b. Then I ran my Method or User Code (the very next line).
4c. Next line added some delay.
4d. You can erase all of this after you captured your tool tip.
5. So, then from the Spy (you'll have to dig through it to find your tool tip) , from the Spy drag and drop it into your Ranorex Repository.
6. You are now set to continue on your test.
Hope this helps any one reading this.