Turbo Mode in Code Module? : General Questions

Turbo Mode in Code Module?

Ask general questions here.

Turbo Mode in Code Module?

Postby Todor » Thu Aug 18, 2011 4: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
Todor
 
Posts: 66
Joined: Mon Jul 25, 2011 12:28 pm

Re: Turbo Mode in Code Module?

Postby Support Team » Thu Aug 18, 2011 5: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
User avatar
Support Team
Site Admin
 
Posts: 4845
Joined: Fri Jul 07, 2006 5:30 pm
Location: Graz, Austria

Re: Turbo Mode in Code Module?

Postby Todor » Thu Aug 18, 2011 5: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?
Todor
 
Posts: 66
Joined: Mon Jul 25, 2011 12:28 pm

Re: Turbo Mode in Code Module?

Postby Support Team » Fri Aug 19, 2011 10: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
User avatar
Support Team
Site Admin
 
Posts: 4845
Joined: Fri Jul 07, 2006 5:30 pm
Location: Graz, Austria

Re: Turbo Mode in Code Module?

Postby Todor » Fri Aug 19, 2011 11: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
Todor
 
Posts: 66
Joined: Mon Jul 25, 2011 12:28 pm


Return to General Questions

Who is online

Users browsing this forum: No registered users and 0 guests

cron