We follow below steps for getting tool tip text.
- Place mouse cursor over the link
- Wait for tool tip
- Get text of shown tool tip
' 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")
' Grab tooltip
ToolTip = Window("nativeclass:=tooltips_class32").GetROProperty("text")
Note:
- We use FireEvent("onmouseover") to simulate mouse placing over the link
- Function wait(1) waits 1 second for a tool tip
- To get tool tip text, we use:Window("nativeclass:=tooltips_class32").GetROProperty("text")