That solution uses FireEvent("onmouseover") and GetROProperty("text") to get tool tip of a link.
Now, I'm going to show how to show how to capture tool tips of images located on a Web page.Actually, the solution is simple.
To capture a tool tip of an image, we can get value of "alt" Run-time Object property with GetROProperty("alt") function:
Let's verify this code in practice. For example, let's check tooltips from Wikipedia Main page:
I've prepared QTP script, which gets all image from this page and checks their tooltips ("alt" property):
When I run this code in QTP, it shows all images containing non-empty tool tip:
The same message boxes will be shown for others images on a Web page.
So, our solution is simple - use GetROProperty("alt") function to get tool tip of image.
As you can see - it works correctly.
- QTP - How to capture tool tip?
- How to record QTP script - VIDEO tutorial
- QTP Descriptive programming - processing images
- QTP VIDEO - How to capture dynamic text
- QTP - How to get font size/color, background color and other attributes of controls
- How to minimize/maximize QTP window before the QTP script execution
- All QTP visual tutorials
Do you like this QTP visual tutorial? Would you like to receive them in the future?
If yes, please subscribe to this blog RSS feed or by Email. (How to subscribe? VIDEO guide)