Page 1 of 1

running tests without mouse movement or keystrokes and speed

Posted: Mon Oct 29, 2007 11:26 pm
by jasong
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?

Posted: Tue Oct 30, 2007 11:48 am
by Support Team
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

settings appear to ignore MouseMoveTime

Posted: Wed Oct 31, 2007 6:50 pm
by jasong
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

Posted: Fri Nov 02, 2007 9:39 am
by Support Team
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

hooray, no mouse movement at all

Posted: Wed Nov 07, 2007 12:32 am
by jasong
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!