How to get ToolTip Style Object

Ranorex Spy, Recorder, and Studio.
AccidentReport
Posts: 76
Joined: Tue Dec 04, 2012 2:30 pm

How to get ToolTip Style Object

Post by AccidentReport » Thu Jul 03, 2014 8:36 am

In my web aplication we have a toolbar with a anumber of buttons. Each button has a tooltip style bubble as you can see in the attached image. How can I gte Ranorex to validate that it shows correctly as when I move off the button with the mouse the tooltip closes so i can't click on it to validate.
Attachments
bubble.png
bubble.png (3.12 KiB) Viewed 1616 times

AccidentReport
Posts: 76
Joined: Tue Dec 04, 2012 2:30 pm

Re: How to get ToolTip Style Object

Post by AccidentReport » Thu Jul 03, 2014 10:04 am

Just to further clarify, this is not a tooltip. Or at least not a tooltip in the way that Ranorex defines them as the ToolTip hotkey does nothing. Hence the issue!

AccidentReport
Posts: 76
Joined: Tue Dec 04, 2012 2:30 pm

Re: How to get ToolTip Style Object

Post by AccidentReport » Thu Jul 03, 2014 11:13 am

A bit more information. I have finally managed to dig through the spy and can see that the tooltip is actually a "popover". Using this I can at least now validate the coded text and action of the tooltip however I'm still not sure how to actually check that the tooltip is being displayed when you have the mouse on the button. Any tips please?
Attachments
popover.png
popover.png (20.5 KiB) Viewed 1610 times

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: How to get ToolTip Style Object

Post by krstcs » Thu Jul 03, 2014 2:09 pm

Have you tried "Validate.Attribute(RepoItemInfo, String, Object)"? Validate on the "Visible" attribute with "true" or "false".

Code: Select all

Validate.Attribute(<your repo object>, "Visible", true);
See this link for documentation on the method and Validate class:
http://www.ranorex.com/Documentation/Ra ... bute_8.htm


If you need to use the result for logical branching, then you can just use == on the attribute.

Code: Select all

if (<your repo object>[.Self].Visible == true) {...}  //use [.Self] if the object is a rooted folder

If that doesn't work, you might be able to check the Location of the element. If it isn't on screen it should be negative or NULL (not sure which, and I might be wrong... :D ).
Shortcuts usually aren't...

AccidentReport
Posts: 76
Joined: Tue Dec 04, 2012 2:30 pm

Re: How to get ToolTip Style Object

Post by AccidentReport » Thu Jul 03, 2014 3:34 pm

The problem is that the bubble doesn't appear as an object in ranorex. It's just an attribute of another object. In my spy window in my last post you can see that the object I'm on is a list item and the popover is an attribute of that. I can't see a way to examoine the popover itself. If I do a validate viisble or whatever it will pass as the list item IS visible - even if the popover is not.

mzperix
Posts: 137
Joined: Fri Apr 06, 2012 12:19 pm

Re: How to get ToolTip Style Object

Post by mzperix » Mon Jul 07, 2014 10:05 am

Hi AccidentReport,

did you try to change the Spy view from Path Editor to Browser and Results (see screenshot) and switch to Advanced tab to see all attributes? Maybe there are more properties of the popover attribute, like visible?

Could there be a way to askt the developers to add a new attribute, ilke that?

Best Regards,
Zoltan
Attachments
browserAndResults.png
browserAndResults.png (200.05 KiB) Viewed 1575 times

Tnimni
Posts: 49
Joined: Thu Jan 02, 2014 4:03 pm

Re: How to get ToolTip Style Object

Post by Tnimni » Thu Jul 10, 2014 2:02 pm

Hi,

What you have to realize is that when you hover with the mouse, the html behind is changed.

Now, if you know a bit of Web Development there are 2 ways of doing it

1. Injection of a new element to the html, let's say with jquery or something like that
2. Changing the attribute of an existing html element, for example, changing the class or changing visible=flase to true

What you have to do is
1. Identify that html element
2. Identify the technique used, if you ask the developer he can tell you right away, insted you wasting time on it
3. Using ranorex, move the mouse to the location and make it hover
4. Verify the html is now showing the current value

Good luck

AccidentReport
Posts: 76
Joined: Tue Dec 04, 2012 2:30 pm

Re: How to get ToolTip Style Object

Post by AccidentReport » Wed Jul 16, 2014 2:05 pm

mzperix and Tnimni ... Thanks for the suggestions. Been focused on something else but will give these a try when I get back on it.