ToolTips

Ask general questions here.
bradj
Posts: 8
Joined: Wed Mar 13, 2013 6:56 pm

ToolTips

Post by bradj » Thu Mar 21, 2013 4:30 pm

I'm having trouble figuring out how to get the tool tip text from a Ranorex button object. Ranorex Spy is able to see the ToolTip in the "Dynamic" section of the element in the Overview tab. How can you get this in code?

I've tried a couple of methods and none seem to work. I've tried positioning the mouse over the button, delaying for a second, then checking the Ranorex.ToolTip.Current.Text property. That didn't work. I've also tried the FindDescendants() method for Ranorex.ToolTip objects and that didn't work either.

I'm testing against a Flash application.

Any ideas?

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

Re: ToolTips

Post by Support Team » Fri Mar 22, 2013 3:04 pm

Hello,

in order to validate the text of a tooltip I would suggest to use the Ranorex Recorder. You can use the hotkey "T" in order to validate the tooltip when it appears. Plese take a look on the section Recorder Hot Keys in our user guide.
With the "Get Value" action you could save the value of the tooltip into a variable.

Regards,
Bernhard
.
Image

bradj
Posts: 8
Joined: Wed Mar 13, 2013 6:56 pm

Re: ToolTips

Post by bradj » Fri Mar 22, 2013 11:09 pm

Is there any way to do it without using the recorder? I'd prefer to do it dynamically in code than rely on the recorder.

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

Re: ToolTips

Post by Support Team » Mon Mar 25, 2013 4:47 pm

Hello,

You can find a very good post how to work with tooltips in our forum using the following link:
http://www.ranorex.com/forum/ranorex-ca ... t4211.html
Maybe one of the suggestions will work for you.

Regards,
Bernhard
.
Image

lila
Posts: 21
Joined: Wed Jun 18, 2014 10:17 am

Re: ToolTips

Post by lila » Mon Nov 03, 2014 1:40 pm

I was not able to get the tooltip value for one of the button in my web application. I am using browser IE 9.

Below was the format used;

string tooltipvalue =
baserepo.<Ranorex Repository Object Path>.FindSingle<Ranorex.ToolTip>(".//Div").Text;

Please let me know if I have to make any changes to the above line .

Thanks in advance for your help

PS: I tried the record and playback method and it did not work for me. Also I personally would not prefer using that method.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3947
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: ToolTips

Post by odklizec » Mon Nov 03, 2014 2:34 pm

Hi,

I would suggest you to check the tooltip value with Ranorex Spy. Just to be sure the tooltip is recognizable by Ranorex. If the tooltip value cannot be obtained with Spy, then it's most probably why it fails in your code?
Pavel Kudrys
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