Recorder - Compressing Delay Times

Ranorex Spy, Recorder, and Studio.
jeffs
Posts: 5
Joined: Wed May 05, 2010 9:53 pm

Recorder - Compressing Delay Times

Post by jeffs » Wed May 05, 2010 11:22 pm

I downloaded Ranorex earlier today, and used Recorder to record a GUI-based session with a win32 app (MFC). This worked fine, and to my surprise, even recorded the duration/interval of the mouse moves and clicks.

However, I'd like the playback to be much faster that the original recording to get through the tests faster. I was able to change the duration of the events, and that helped. But is there a way to set a default duration for mouse moves, drag, up, down so that I can compress the delay times?

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Recorder - Compressing Delay Times

Post by Support Team » Thu May 06, 2010 8:34 am

Hi!
jeffs wrote:But is there a way to set a default duration for mouse moves, drag, up, down so that I can compress the delay times?
Of course you can find the properties you are searching for in the Ranorex.Mouse Class.
DefaultClickTime
Gets ors sets the default time of a mouse click, i.e. the time elapsed between the mouse button being pressed (Down event) and released again (Up event).
DefaultMoveTime
Gets or sets the default time it takes to move the mouse to a specified position.

Just set these to properties in the main of your project to the value you want (no negative values allowed).
Mouse.DefaultMoveTime = 0; //fastest Move Time
Mouse.DefaultClickTime = 0; //fastest Click Time
Regards,
Peter
Ranorex Support Team
.
Image

jeffs
Posts: 5
Joined: Wed May 05, 2010 9:53 pm

Re: Recorder - Compressing Delay Times

Post by jeffs » Fri May 07, 2010 1:32 am

Setting the Mouse Movetime helps, that's not all that is needed. We need to minimize the duration as well.

The problem is with the default Delay time. This shows up as Duration property, and gets inserted into the C# code as Delay.Milliseonds(NN) where NN is some integer >=0.

The only way I've found to get around this is to select all the items in the list that the Recorder generates, and then set the property Duration to 0ms for all items.

Is there a setting for the override the duration so that there is no delay? I could edit the C# code to comment out the Delay calls, but these changes are overridden after each build.

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Recorder - Compressing Delay Times

Post by Support Team » Fri May 07, 2010 9:09 am

jeffs wrote:Is there a setting for the override the duration so that there is no delay?
Yes, there is. Just set the Delay.SpeedFactor = 0.0 and all delays will be disabled.

Usually, for recordings Ranorex generates this code automatically for you depending on the speed factor you set and whether the Turbo Mode is enabled (refer to this section in the Ranorex User Guide).

Regards,
Alex
Ranorex Support Team
.
Image