Page 1 of 1

Turbo Mode in Code Module?

Posted: Thu Aug 18, 2011 3:57 pm
by Todor
Hi,

I just wanted to know if a Codemodule can have something like the recording's turbo mode?
If yes, is there a Command to enable it in the Code Module?

looking forward hearing from you

Re: Turbo Mode in Code Module?

Posted: Thu Aug 18, 2011 4:05 pm
by Support Team
Hi,
just wanted to know if a Codemodule can have something like the recording's turbo mode?
If yes, is there a Command to enable it in the Code Module?
Please take a look to following section in your UserCodeFile
void ITestModule.Run()
{
    Mouse.DefaultMoveTime = 300;
    Keyboard.DefaultKeyPressTime = 100;
    Delay.SpeedFactor = 1.0;
}
Basically you have to set all properties to 0.

Regards,
Peter
Ranorex Team

Re: Turbo Mode in Code Module?

Posted: Thu Aug 18, 2011 4:47 pm
by Todor
Thank you for your quick and informative answer :)

I have some delays build in my test suite. In which aspect does Delay.Speedfactor = 0; affect them?

Re: Turbo Mode in Code Module?

Posted: Fri Aug 19, 2011 9:46 am
by Support Team
Hi,
Todor wrote:I have some delays build in my test suite. In which aspect does Delay.Speedfactor = 0; affect them?
There are two overloads for the Delay
http://www.ranorex.com/Documentation/Ra ... onds_1.htm

If you set the property scaleBySpeedFactor to true, then the Speedfactor will be considered. If you set the property to false, this is done by default in a Recorder Action, then the Speedfactor won't be considered.

Regards,
Peter
Ranorex Team

Re: Turbo Mode in Code Module?

Posted: Fri Aug 19, 2011 10:11 am
by Todor
Okay, that means when i use

Code: Select all

Delay.Duration(1000);
//at a
Delay.Speedfactor= 0;
the Delay will be ignored, right?
Because scaleBySpeedFactor will be true for this Delay.Duration(1000);?

*Edit: Okay i have tried it... When you set Delay.Speedfactor to zero, none of the Delays are executed.
Ignore the two questions above, i am too lazy to delete them ;) Thanks again for your help

regards