For example, how to get tool tip ('Go to My Yahoo!') from the yahoo page:
This QTP tutorial shows and explains How to get tool tip in QuickTest Professional.
Actually, this is not a difficult task. The steps are:
- Place mouse cursor over the link
- Wait for tool tip
- Get text of shown tool tip
This QTP script captures a text of a tool tip:
Please, pay attention on details:
- 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:
Let's run our code and compare captured tool tip with expected ('Go to My Yahoo!'):
As you can see, above QTP script captures correct text of a Tool tip.
I hope, you will add this script to your QTP functions library.
- How to record QTP script - VIDEO tutorial
- QTP - How to set/get system time and date
- QTP VIDEO - How to run QTP test from command line
- 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
- How to execute QTP script from LoadRunner
- All QTP visual tutorials
Do you have comments or questions on this topic? If yes, please post them.
It's very important to know your opinions...
They allow to create more useful, interesting, and informative blog. This is my primary goal.