tooltip verification problem (Java)
User Becken, Brent R (Brent.Becken@UNISYS.com.nospam) posted:
I need to verify a tooltip that appears in a Java application. In a script
I have been able to provoke appearance of the tooltip via playback of a
low-level recording that moves the mouse cursor. The tooltip persists for
about 4 seconds before vanishing so a script should have enough time to
find the tooltip.
My problem is that I have been unable to determine the recognition string
for the object that is the tooltip. I know the text that will appear in
the tooltip object but I don't know the type of the tooltip object. I have
built all sorts of recognition strings plugged into SQAWaitForObject() to
look for the tooltip object but it is never found. In the recognition
string, for Type= I have tried JavaWindow, JavaObject, and JToolTip
(according to the developers, the tooltip is a JToolTip class object; but
this is not acknowledged as a legitimate object type in the Robot/SQABasic
documentation). To specify the known tooltip text I have used JavaText=,
Text=, and Name= in the recognition string. I've also tried using
SQAGetChildren() on the top-level window (as well as various other
container type objects) but nothing that proves to be the tooltip shows up
in the returned array.
For any other object, I just go into record mode, select object properties
VP, and then point the finger at the object in question to see its
recognition string. But I can't do that with the tooltip because it
disappears before I can get the finger on it while manipulating the Robot
Any ideas welcome.
Re: tooltip verification problem (Java)
User (email@example.com) posted:
Info on the MSDN web site indicates that ToolTip is a PROPERTY of (some)
buttons and comboboxes on toolbars. Here is the syntax from their
sToolTip = <object>.ToolTip
If you are trying to capture a property that contains a ToolTip's text for
a control that is not known to Robot (read 'Generic'), i.e., you are out
I tried this with the following applications, most of which were no-go's,
but I did find ONE that it worked for:
1. The "Go" button in IE5: No ToolTip property for the selected Toolbar
object (only 'ShowTips').
2. A VisualBasic 5.0 app: Toolbar buttons don't have ToolTips.
3. A Delphi 5.0 app (class=TPanel): Delphi 5.0 not (fully) supported by
Robot. Toolbar mapped as 'GroupBox'. I believe this is a
'painted-on'/'soft' control. There may be a 'hard' Toolbar control (don't
have Delphi Dev environment, so can't verify). I was able to convince
developer to replace one of the other painted-on controls with a static
version that Robot could see/manipulate.
4. Another VB5 app, Class=Toolbar (OCX): It's a control array, so
Buttons(#).ToolTipText. However, SQAFindObject found specified RecStr,
but SQAGetProperty() was unable to find ANY properties for this control.
I have no idea why.