Adding delays: different ways

Ask general questions here.
Posts: 39
Joined: Mon Jul 25, 2011 6:12 pm

Adding delays: different ways

Post by LPG » Thu Sep 15, 2011 3:47 pm

What is the difference between the following 2 ways of adding a delay?

1. In code: System.Threading.Thread.Sleep(5000);
2. In the recording: Add New Action > Delay.


User avatar
Posts: 238
Joined: Mon May 10, 2010 11:04 am
Location: Dundee, Scotland

Re: Adding delays: different ways

Post by sdaly » Thu Sep 15, 2011 3:58 pm

I *think* Ranorex.Delay calls Thread.Sleep so it is the same thing....only difference is you can specify seconds, minutes etc and Ranorex will scale it before passing to Thread.Sleep and it will output in the progress form.

I usually use Ranorex.Delay if I want users to know a delay is occurring and I use Thread.Sleep when in a loop but I want the last message shown on the progress form to still be show.

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

Re: Adding delays: different ways

Post by Support Team » Thu Sep 15, 2011 4:45 pm

Yes perfectly right.

Ranorex Support Team