Print Page | Close Window

QTP Tutorial 4 Moving mouse to a particular object

Printed From: One Stop Testing
Category: Testing Tools @ OneStopTesting
Forum Name: QuickTest Pro @ OneStopTesting
Forum Discription: QuickTest Pro is a fresh approach to automated software and application testing that addresses testing needs of both business analysts and Quality Assurance professionals.
URL: http://forum.onestoptesting.com/forum_posts.asp?TID=7212
Printed Date: 13Mar2025 at 11:00am


Topic: QTP Tutorial 4 Moving mouse to a particular object
Posted By: expertqtp
Subject: QTP Tutorial 4 Moving mouse to a particular object
Date Posted: 22Oct2009 at 4:08am
Sometimes its required to place your mouse cursor on an object in your application and then perform some operation like clicking that object or even right clicking. I have created a short QTP tutorial for moving your mouse cursor on any object in your application.

I used Google webpage to create this small tutorial on HP Quicktest Professional. This script will hover over the mouse cursor inside the search box.(It will not click inside the search box, it will simply bring the mouse over the search box)

The QTP Script goes here:

x=Browser("micclass:=Browser").Page("micclass:=Page").WebEdit("name:=q").GetROProperty("abs_x")
y=Browser("micclass:=Browser").Page("micclass:=Page").WebEdit("name:=q").GetROProperty("abs_y")
Set obj=CreateObject("Mercury.DeviceReplay")
obj.MouseMove x,y

For an explanation of the above code, you can read the complete article at http://qtpgoodtutorials.blogspot.com/2009/10/hp-qtp-tutorial-mercury-devicereplay.html - QTP Tutorials

-------------
http://quicktesthp.blogspot.com
http://qtpgoodtutorials.blogspot.com



Replies:
Posted By: yogindernath
Date Posted: 22Oct2009 at 4:39am
Good article Buddy.

 


-------------
http://www.softwaretestinggenius.com - http://www.softwaretestinggenius.com
A Storehouse of Complete Knowledge on Software Testing & QA under one Roof



Print Page | Close Window