Turbo Mode in Code Module?

Ask general questions here.
Todor
Posts: 66
Joined: Mon Jul 25, 2011 11:28 am

Turbo Mode in Code Module?

Post by Todor » Thu Aug 18, 2011 3:57 pm

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

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

Re: Turbo Mode in Code Module?

Post by Support Team » Thu Aug 18, 2011 4:05 pm

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
.
Image

Todor
Posts: 66
Joined: Mon Jul 25, 2011 11:28 am

Re: Turbo Mode in Code Module?

Post by Todor » Thu Aug 18, 2011 4:47 pm

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?

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

Re: Turbo Mode in Code Module?

Post by Support Team » Fri Aug 19, 2011 9:46 am

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
.
Image

Todor
Posts: 66
Joined: Mon Jul 25, 2011 11:28 am

Re: Turbo Mode in Code Module?

Post by Todor » Fri Aug 19, 2011 10:11 am

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