running tests without mouse movement or keystrokes and speed

Class library usage, coding and language questions.
jasong
Posts: 49
Joined: Fri Oct 26, 2007 9:38 pm
Location: Texas

running tests without mouse movement or keystrokes and speed

Post by jasong » Mon Oct 29, 2007 11:26 pm

When I am first validating a Python script I find it helpful to see the movements and keystrokes like I would see if run manually.

However, once that is done I would like to disable the mouse movement and keystrokes. Is this possible?

note that by 'keystrokes' I am referring to the presentation of entering a character at a time that simulates actual typing. For test runs I would like to just enter all the text at once.

Furthermore there is the issue of speed. How in the script do I set the speed?

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Post by Support Team » Tue Oct 30, 2007 11:48 am

SleepTime

You can tune the speed of the test application with the SetSleepTime (sleepTime) function.
sleepTime is an integer value indicating the interval (in milliseconds) the script will be inactive between commands.

MouseMoveTime

The time duration of a mouse move operation can be set in milliseconds with the MouseSetMoveTime(moveTime) function.
A moveTime of 0 will move the mouse instantly.

KeyPressTime

You can set the time duration of one key press in milliseconds in the SendKeys() function.

Jenö
Ranorex Support Team

jasong
Posts: 49
Joined: Fri Oct 26, 2007 9:38 pm
Location: Texas

settings appear to ignore MouseMoveTime

Post by jasong » Wed Oct 31, 2007 6:50 pm

KeyPressTime is working great but the mouse is moving slowly.
I have set the MouseMoveTime with:

Code: Select all

    Ranorex.MouseSetMoveTime(1)
Is this the correct usage?

Jason
Last edited by jasong on Wed Nov 07, 2007 12:30 am, edited 1 time in total.

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Post by Support Team » Fri Nov 02, 2007 9:39 am

Yes, by default the mouse should now instantly move from one position to the next, unless you specify another value for 'moveTime' in the action methods (e.g. RxMouseClickControl, RxMouseClickElement, ...).

If you specify a value for moveTime in an action method, the specified moveTime will be used for that call to the method.

Alex
Ranorex Support Team

jasong
Posts: 49
Joined: Fri Oct 26, 2007 9:38 pm
Location: Texas

hooray, no mouse movement at all

Post by jasong » Wed Nov 07, 2007 12:32 am

I removed all mouse movement parameters from the actions (e.g. MouseClick) and now actions are so fast, I have to insert some sleep times.

Thanks a ton, this is great!