"MouseMove" Function of Mercury Device replay not moving the mouse in QTP 11

2,275 views
Skip to first unread message

Shalabh Dixit

unread,
Jan 13, 2012, 12:30:37 AM1/13/12
to QTP - HP Quick Test Professional - Automated Software Testing
This is something strange I faced in last few days. I'm using simple
code to keep my system unlocked while script is getting executed.

Set deviceReplay = CreateObject("Mercury.DeviceReplay")
deviceReplay.MouseMove 0,0
Set deviceReplay = Nothing

But the above code is not moving the mouse cursor. Strangely the same
works fine in QTP 10.0

Does anybody tried using above or provide any input on the same.?

Thanks
-Shalabh Dixit

nilesh patil

unread,
Jan 13, 2012, 2:05:13 AM1/13/12
to mercu...@googlegroups.com
Hi Shalabh,

I have tried the same code and its working with me...
 
Set devrep = CreateObject("Mercury.DeviceReplay")
devrep.MouseMove 0,0
Set devrep = nothing
 

 
-Shalabh Dixit

--
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to Mercu...@googlegroups.com
To unsubscribe from this group, send email to
MercuryQTP+...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en

Abhijeet

unread,
Jan 14, 2012, 12:27:10 AM1/14/12
to QTP - HP Quick Test Professional - Automated Software Testing
Hi Shalabh,

While I'm not sure why DeviceReplay is not working for you, you can
use DotNetFactory to achieve the same. You can create an instance of
Syste.Drawing.Point and use that to move the mouse. Here's something
you could try as an alternative :

Set objCursor =
DotNetFactory.CreateInstance("System.Drawing.Point","System.Drawing",
x, y)

objCursor.x = 5
objCursor.y = 5

Thanks,
Abhijeet

shashank shekhar raj

unread,
Jan 13, 2012, 12:40:27 PM1/13/12
to mercu...@googlegroups.com
Where the above code is not moving the Mouse Cursor ...If it is work fine in QTP 10.0......

-Shalabh Dixit

Shalabh Dixit

unread,
Jan 21, 2012, 2:05:38 PM1/21/12
to mercu...@googlegroups.com
It's strange obviously that the code which works fine in qtp 10 is not working in upgraded ver of the same...

Have anybody of you tried the same code on your qtp 11 machines?

Regards
Shalabh Dixit
My QTP Blog

nilesh patil

unread,
Jan 27, 2012, 4:19:32 AM1/27/12
to mercu...@googlegroups.com
Hi Shalabh,

I have tried the same code of tours with QTP 11 and its working fine with me....

uma mahesh

unread,
Jan 30, 2012, 1:47:41 AM1/30/12
to mercu...@googlegroups.com
can you please tell me why this code is for and where we will use this things

Shalabh Dixit

unread,
Jan 30, 2012, 9:55:04 AM1/30/12
to mercu...@googlegroups.com
It is used to move the mouse pointer to a particular position. This can also be used as a way around to keep your system unlocked till your scripts are getting executed.


Regards
Shalabh Dixit
My QTP Blog



On Mon, Jan 30, 2012 at 12:17 PM, uma mahesh <umamah...@gmail.com> wrote:
can you please tell me why this code is for and where we will use this things
Reply all
Reply to author
Forward
0 new messages