Forum Discussion

levi_bryant's avatar
levi_bryant
Contributor
11 years ago

Problem Finding ToolTip/HoverOver Objects

 

When you move your mouse off the word that is causing the tooltip, the tooltip disappears so you can never retrieve it’s object name.

The tooltip does not show up in the object browser because when you go to the object browser the tooltip disappears.

 

Here is the tooltip that pops up when hovering over the word cmdln.

See attached file for image.

 

Below is a line of code that grabs the text inside this popup object.

This section of code was not written by me and the person who wrote it is no longer around.

 

var sToolTipText = Sys.Process("devenv").WPFObject("HwndSource: PopupRoot", "", 1).WPFObject("PopupRoot", "", 1).WPFObject("lbItems").WPFObject("ListBoxItem", "", 1).WPFObject("ListBoxItem", "", 1).WPFObject("ContentControl", "", 1).WPFObject("WpfTextView").TextSnapshot.GetText();

 

 

I am unable to use the object spy to locate this object because before I can even move my mouse over the object it disappears.

That object only exists as long as I keep my mouse over cmdln. This also means I can’t use the object browser to locate that object because when I open the object browser, the popup object disappears.

 

When looking in the object browser I don’t even see the path listed above. I can’t see WPFObject("HwndSource: PopupRoot", "", 1) in the list under Sys.Process(“devenv”).

 

Based on the code that is able to grab that object I know it is possible I just don’t know how they did it.

 

I need to know how to locate and work with objects like these.

13 Replies