How to make delays in turbo-mode

Best practices, code snippets for common functionality, examples, and guidelines.
zator
Posts: 53
Joined: Wed Jul 04, 2012 1:44 pm
Location: Kraków, POLAND

How to make delays in turbo-mode

Post by zator » Wed Aug 08, 2012 12:17 pm

Hi,

I usually put delays between actions to see more clearly how my tests are working but when i wanna leave my testing mashine to let it do many iterations, i turn turbo mode. But in some cases delays are necessary to make tests work correctly, like waiting to save file before checking it etc.
I know that my question sounds stupid but is it possible to put same delays while running Ranorex Recordings??

Paweł

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

Re: How to make delays in turbo-mode

Post by Support Team » Wed Aug 08, 2012 3:22 pm

Hi again ;),

If I correctly understand the question then the answer would be that the turbo mode has no influence on the added Delay- Actions. If you add a Delay- Action to your recording Ranorex always waits that amount of time although you whether the turbo mode is enabled or not.

Regards,
Markus
Ranorex Support Team

zator
Posts: 53
Joined: Wed Jul 04, 2012 1:44 pm
Location: Kraków, POLAND

Re: How to make delays in turbo-mode

Post by zator » Thu Aug 09, 2012 8:45 am

Yes, that what i was looking for. Thank you.

Paweł

zator
Posts: 53
Joined: Wed Jul 04, 2012 1:44 pm
Location: Kraków, POLAND

Re: How to make delays in turbo-mode

Post by zator » Thu Aug 23, 2012 11:51 am

Hi again,

I want to resfesh my last question because i could not find any information in documentation. If i have user code action in recording where i have a few "Delay.Milliseconds" functions invoked and i turn on turbo mode, does this functions will be still working?

Paweł

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

Re: How to make delays in turbo-mode

Post by Support Team » Thu Aug 23, 2012 12:24 pm

Hi,

If you want that the Delay in UserCode is not scaled by the current speed factor you have to set the "scaleBySpeedFactor" parameter to false, for instance you can use the following method:
Delay.Milliseconds(5000, false);
Here is the link to the specific API documentation: Delay Class.

Regards,
Markus
Ranorex Support Team

zator
Posts: 53
Joined: Wed Jul 04, 2012 1:44 pm
Location: Kraków, POLAND

Re: How to make delays in turbo-mode

Post by zator » Thu Aug 23, 2012 1:22 pm

Thank you very much Markus!

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

Re: How to make delays in turbo-mode

Post by Support Team » Thu Aug 23, 2012 1:23 pm

I am glad I was able to help :).

Regards,
Markus
Ranorex Support Team