Tricentis Tosca 16.0 Released on Feb-2023 ----- UFT has been upgraded from UFT 15.0.1 to UFT One 15.0.2, Beginning at November 2020.

Wednesday, 19 August 2015

How to get tool tip of Objects using QTP/UFT ?

We follow below steps for getting tool tip text.
  1. Place mouse cursor over the link
  2. Wait for tool tip
  3. Get text of shown tool tip
Script:

' Place mouse cursor over the link
Browser("Google!").Page("Google!").WebElement("text:=My Google!").FireEvent "onmouseover"
wait 1
' Grab tooltip
ToolTip = Window("nativeclass:=tooltips_class32").GetROProperty("text")


Note:
  1. We use FireEvent("onmouseover") to simulate mouse placing over the link
  2. Function wait(1) waits 1 second for a tool tip
  3. To get tool tip text, we use:Window("nativeclass:=tooltips_class32").GetROProperty("text")