Page 1 of 1

How to get ToolTip Style Object

Posted: Thu Jul 03, 2014 8:36 am
by AccidentReport
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.

Re: How to get ToolTip Style Object

Posted: Thu Jul 03, 2014 10:04 am
by AccidentReport
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!

Re: How to get ToolTip Style Object

Posted: Thu Jul 03, 2014 11:13 am
by AccidentReport
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?

Re: How to get ToolTip Style Object

Posted: Thu Jul 03, 2014 2:09 pm
by krstcs
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 ).

Re: How to get ToolTip Style Object

Posted: Thu Jul 03, 2014 3:34 pm
by AccidentReport
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.

Re: How to get ToolTip Style Object

Posted: Mon Jul 07, 2014 10:05 am
by mzperix
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

Re: How to get ToolTip Style Object

Posted: Thu Jul 10, 2014 2:02 pm
by Tnimni
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

Re: How to get ToolTip Style Object

Posted: Wed Jul 16, 2014 2:05 pm
by AccidentReport
mzperix and Tnimni ... Thanks for the suggestions. Been focused on something else but will give these a try when I get back on it.