Capture Tool Tip Text

Jul 10, 2009 at 8:40 AM

Hi

I am automating a Silverlight application and trying to capture tool tip text from it.

I am able to point my mouse cursor over a graph where a tool tip raises. Then i reInitialised window elements and called LogStruture. But i found this tool tip is not identified.

I also tried with "window.ToolTip" but it returned exception "No tool tip identified". I am stuck over here, can somebody please help me over this.

You can find my approach in the below code. How to proceed from here?

Thanks in advance.

<font size="2">

Condition con1 =

</font>

new PropertyCondition(AutomationElement.ControlTypeProperty, ControlType.Text);

<font size="2" color="#2b91af"><font size="2" color="#2b91af">

AutomationElementCollection

</font></font>
<font size="2" color="#2b91af">

 

</font>

aeXYAxis = aeGraphPane.FindAll(TreeScope.Descendants, con1);

<font size="2" color="#2b91af"><font size="2" color="#2b91af">

AutomationElementCollection

</font></font><font size="2" color="#2b91af">

 

</font>

aeXYAxis = aeGraphPane.FindAll(TreeScope.Descendants, con1);

<font size="2">

System.Windows.

</font>

Rect swRectPane = graphPane.ClickablePoint;

Cursor.Position = new System.Drawing.Point(Convert.ToInt32((int)swRectPane.X), Convert.ToInt32((int)swRectPane.Y));

graphPane.ReInitialize(

InitializeOption.NoCache);

Coordinator
Jul 11, 2009 at 8:37 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Jul 14, 2009 at 7:19 AM

Hi Vivek

Is there any function available to capture text between the given co-ordinates in white?

Am stuck here, please help me to come out of this. U can even suggest me any method/class available to achieve this in C#.

Thanks in advance.

Coordinator
Jul 14, 2009 at 12:32 PM

You can get AutomationElement from a point and  then get the text for it. (AutomationElement.FromPoint)

Jul 24, 2009 at 6:40 AM

Vivek,

AutomationElement.FromPoint is returning again the whole object.

Since White currently not recognizing SL tool-tip, my requirement has been changed to capture text in within specified boundaries.

To ur knowledge, is that possible to capture text from SL component in a web application?

Coordinator
Jul 31, 2009 at 10:27 AM

what do you mean by whole object?

(btw as you would have noticed this dicussion has been marked as an issue.)