Ranorex versions: 3.1.3, 3.0.1
Issue 1: Neither the API documentation (http://www.ranorex.com/Documentation/Ranorex/), the tutorial (http://www.ranorex.com/Documentation/Ra ... torial.pdf), nor the user guide shipped with Ranorex adequately describe the operation of Delay.SpeedFactor.
There is a post in the forum (unable-to-uncheck-checkbox-in-webdocument-t820.html) that does say something about the operation, but either it is wrong, or the functionality has been broken. I vote for it being broken. "and if you set the Delay.SpeedFactor you can globally scale all delays, so for example if you use Delay.Seconds(10) in some locations, and you set
SpeedFactor = 0.5 then all delays are reduced to 5 seconds.
"
Issue 2: Operation is the opposite of what is decribed in the posting, and is opposite to the intuitive understanding of the operation. It doesn't really matter to me which way it works. I just needed a way to know. Please add to the documentation.
Here is a bit of code that demonstrates this:
CODE: SELECT ALL
//
/*
* Created by Ranorex
* User: u0019165
* Date: 2012-01-19
* Time: 12:57
*
* To change this template use Tools | Options | Coding | Edit Standard Headers.
*/
using System;
using System.Threading;
using System.Drawing;
using System.Collections.Generic;
using System.Text.RegularExpressions;
using WinForms = System.Windows.Forms;
using Ranorex;
using Ranorex.Core;
using Ranorex.Core.Reporting;
using Ranorex.Core.Testing;
namespace SpeedFactor
{
class Program
{
[STAThread]
public static int Main(string[] args)
{
Keyboard.AbortKey = System.Windows.Forms.Keys.Pause;
int error = 0;
string logFileName = "Reports/Test.rxlog";
Report.Setup(ReportLevel.Info, logFileName, true);
Mouse.DefaultMoveTime = 50;
Keyboard.DefaultKeyPressTime = 0;
Delay.SpeedFactor = 1.0;
try
{
Report.Info("Delays are 6 seconds");
Report.Info("speed factor = 1.0");
Report.Info(System.DateTime.Now.ToString());
Report.Info("Delaying");
Delay.Milliseconds(6000);
Report.Info(System.DateTime.Now.ToString());
Delay.SpeedFactor = 0.5;
Report.Info("speed factor = 0.5");
Report.Info(System.DateTime.Now.ToString());
Report.Info("Delaying");
Delay.Milliseconds(6000);
Report.Info(System.DateTime.Now.ToString());
Delay.SpeedFactor = 2.0;
Report.Info("speed factor = 2.0");
Report.Info(System.DateTime.Now.ToString());
Report.Info("Delaying");
Delay.Milliseconds(6000);
Report.Info(System.DateTime.Now.ToString());
}
catch (Exception e)
{
Report.Error("Unexpected exception occurred: " + e.ToString());
error = -1;
}
return error;
}
}
}The output is:
2012/01/19 13:16:12.886 INFO User Delays are 6 seconds
2012/01/19 13:16:12.889 INFO User speed factor = 1.0
2012/01/19 13:16:12.906 INFO User 2012-01-19 13:16:12
2012/01/19 13:16:18.909 INFO User 2012-01-19 13:16:18
2012/01/19 13:16:18.916 INFO User speed factor = 0.5
2012/01/19 13:16:18.923 INFO User 2012-01-19 13:16:18
2012/01/19 13:16:30.930 INFO User 2012-01-19 13:16:30
2012/01/19 13:16:30.938 INFO User speed factor = 2.0
2012/01/19 13:16:30.945 INFO User 2012-01-19 13:16:30
2012/01/19 13:16:33.952 INFO User 2012-01-19 13:16:33