how to capture tool tip in QTP and which check point is needed?
Question ID: 105786
1
0
Marked as spam
Posted by (Questions: 17, Answers: 7)
Asked on January 9, 2015 6:55 am
55 views
Answers (1)
2
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.

http://www.w3schools.com/aspnet/showaspx.asp?filename=demo_prop_webcontrol_standard_tooltip

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.

http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_image_test

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: 387, Answers: 66)
Answered on January 30, 2015 9:20 pm
EyeOnTesting

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

X
Scroll to Top