how to capture tool tip in QTP and which check point is needed?
Question ID: 105786
Marked as spam
Posted by (Questions: 17, Answers: 7)
Asked on January 9, 2015 6:55 am
Answers (1)
Private answer

The answer really depends on the object properties. Here's a couple of examples.

This example, the WebButton has a ToolTip property set (you can see the code on the web page below), but you have to use the ''title'' property to get the value of it.

tooltip = Browser(''Tryit Editor v2.1 - Show'').Page(''Tryit Editor v2.1 - Show'').Frame(''Frame'').WebButton(''Submit'').QueryValue(''title'')

msgbox tooltip

In this example, you have to use the ''alt'' property to get the tooltip value.

tooltip = Browser(''Tryit Editor v2.3'').Page(''Tryit Editor v2.3'').Frame(''view'').Image(''Smiley face'').QueryValue(''alt'')

msgbox tooltip

As for what checkpoint to use, most of the time you can use the Standard Checkpoint to get these type of values, however in example 1, it doesn't get the title property, so you have to use code to extract it. In example 2, the Standard Checkpoint will get the ''alt'' property, so it works fine for that type of object.

The key is to know what property is being used for the tooltip and then using the appropriate method for extracting the value.

Marked as spam
Posted by (Questions: 386, Answers: 64)
Answered on January 30, 2015 9:20 pm

Welcome back to "EyeOnTesting" brought to you by Orasi Software, Inc.

Scroll to Top