Page 1 of 1

How to get Tooltip text from Infragistic Chart

Posted: Thu Aug 13, 2009 3:00 pm
by thangavel
Hi,

I have one web application, which contains infragistics charts and standard SilverLight controls (SilverLight 3.0). I need to get Tooltip text from that Chart/ Silverlight controls.

Please help me on this.

Re: How to get Tooltip text from Infragistic Chart

Posted: Thu Aug 13, 2009 5:08 pm
by Support Team
Please, try to use the ToolTip adapter you get by calling Ranorex.ToolTip.Current. The corresponding RxPath is "/tooltip".

Regards,
Alex
Ranorex Support Team

Re: How to get Tooltip text from Infragistic Chart

Posted: Fri Aug 14, 2009 11:16 am
by thangavel
Hi

Code: Select all

//C# code
string s = Ranorex.ToolTip.Current.Text;
The above code is fetching normal window tooltips but not SilverLight Tooltips.
The Following code is to get the text from the PlotArea, move the cursor to the text then wait 2 seconds for the tool tip displayed. then tried to get all the Tooltip descendants. But it returns empty.

Code: Select all

//C# code
Ranorex.Text polymer = SLForm.FindSingle("./container[@automationid='scrollContent']/text[@name='Polymer']");
webDocument.Browser.Activate();
Ranorex.Mouse.MoveTo(polymer.Element.ScreenLocation.X, (polymer.Element.ScreenLocation.Y - 200));
System.Threading.Thread.Sleep(2000);
IList<Ranorex.ToolTip> tt = SLForm.FindDescendants<Ranorex.ToolTip>();
When I mouse over to the chart, some tooltip will be displayed. I need to capture that. Refer the screenshot.
ToolTip_Chart_Infragistics.JPG

Re: How to get Tooltip text from Infragistic Chart

Posted: Fri Aug 14, 2009 12:16 pm
by Support Team
I just tried to reproduce that issue with the Infragistic Silverlight samples on their homepage. In the samples that have a tooltip, the ToolTip element is always a descendant of the "SilverLight Control" element, i.e. a search using FindDescendants<Ranorex.ToolTip>() on that element should give you the tooltip element. I can't guarantee that your Silverlight control behaves the same way, though.

The easiest way to check whether your Silverlight control provides a tooltip element is to take a snapshot of the control while a tooltip is visible and then inspect that snapshot. To do that track the Silverlight control using the "Track" button or "Instant Tracking" in Ranorex Spy, move over the control to make the tooltip appear, and when the tooltip appears press the "Scroll Lock" key on your keyboard to make a snapshot of the Silverlight element you tracked before (see topic "Snap shots from popup windows, dropdown combo boxes or dropdown menus" in the Ranorex User Guide http://www.ranorex.com/support/user-gui ... html#c2072).
Once you have the snapshot, watch for a "Popup" element that is a direct child of the "Silverlight Control" element. With my Infragistics samples there was always a tooltip element inside that "Popup" element.

Regards,
Alex
Ranorex Support Team

Re: How to get Tooltip text from Infragistic Chart

Posted: Fri Aug 14, 2009 12:41 pm
by thangavel
Hi,

Thanks for your clarifiaction.
I tried this approach also - FindDescendants<Ranorex.ToolTip>()
But it returns null.

I have communicated the development team to investigate about the Chart.
That chart is developed using VISIFIRE charts (Open Source Silverlight & WPF Chart Controls. With Visifire you can create and embed animated charts in minutes). Is there any support for visifire charts?

Re: How to get Tooltip text from Infragistic Chart

Posted: Fri Aug 14, 2009 12:54 pm
by Support Team
I just checked with the Visifire SL samples ("DateTimeAxis.htm"), actually they provide quite good automation support. There is a text element ("text[@automationid='ToolTipTextBlock']") that corresponds perfectly to the tooltip. Just get that element and check out its the Visible and Text properties.

Regards,
Alex
Ranorex Support Team

Re: How to get Tooltip text from Infragistic Chart

Posted: Fri Aug 14, 2009 2:33 pm
by thangavel
Hi Alex,

Thanks a lot for your support. I just tried to get all visible TEXT descendants within the form. It is working perfectly. :D