Hello
I am having issues with clicks on VM . There are no errors j, just that Click command executes but actual click does not happen and so ranorex is unable to find following element. I am using ranorex libraries and not ranorex studio. I have seen that In ranorex forums , support is suggesting to try turbo mode. How ever, I could not find how to enable turbo mode, if we are only using ranorex libraries.
- How can I enable turbo in this scenario?
- And if there's any other suggestion to deal with clicks on VM ?
Thank You
enabling turbo for ranorex libraries
Re: enabling turbo for ranorex libraries
Hi,
The Turbo mode is just a mode, with some eliminated delays. It should be enough to add these lines at start of your code modules:
Default values (with disabled Turbo mode):
Generally speaking, Ranorex does not encourage people to use this mode, because it could lead to some unwanted side effects. On the other hand, I found it useful especially on VMs, where it really helps with strange mouse movements and missclicks. But use it with caution
The Turbo mode is just a mode, with some eliminated delays. It should be enough to add these lines at start of your code modules:
Code: Select all
Mouse.DefaultMoveTime = 0;
Keyboard.DefaultKeyPressTime = 20;
Delay.SpeedFactor = 0.00;
Code: Select all
Mouse.DefaultMoveTime = 0;
Keyboard.DefaultKeyPressTime = 100;
Delay.SpeedFactor = 1.00;
Last edited by odklizec on Tue Aug 13, 2019 11:10 am, edited 1 time in total.
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
Re: enabling turbo for ranorex libraries
I've got our code modules setup to use Turbo mode on our test machine, and non-Turbo mode on other machines. We do have a few modules that are speed sensitive so I just slow them down to normal speed on a case-by-case basis. Turbo mode works good for us! Shaves off a stack of testing time too.
Re: enabling turbo for ranorex libraries
Thank You. This seems to have worked and tests are stabilized to some extent. Is there a way to switch off turbo mode for some clicks ?
Is it simply, updating property values as in disabled mode just before the click and expect it to work normal (without turbo)?
Is it simply, updating property values as in disabled mode just before the click and expect it to work normal (without turbo)?
odklizec wrote: ↑Tue Aug 13, 2019 10:03 amHi,
The Turbo mode is just a mode, with some eliminated delays. It should be enough to add these lines at start of your code modules:Default values (with disabled Turbo mode):Code: Select all
Mouse.DefaultMoveTime = 0; Keyboard.DefaultKeyPressTime = 20; Delay.SpeedFactor = 0.00;
Generally speaking, Ranorex does not encourage people to use this mode, because it could lead to some unwanted side effects. On the other hand, I found it useful especially on VMs, where it really helps with strange mouse movements and missclicks. But use it with cautionCode: Select all
Mouse.DefaultMoveTime = 0; Keyboard.DefaultKeyPressTime = 100; Delay.SpeedFactor = 1.00;
Re: enabling turbo for ranorex libraries
yes you can update the speed any time to make the adjustment. Just giving it a try I adjusted the speed mid-module and it took effect immediately. There are better ways to structure this but here is the basic example of how I tested it:neeshpal wrote: ↑Tue Aug 13, 2019 7:15 pmThank You. This seems to have worked and tests are stabilized to some extent. Is there a way to switch off turbo mode for some clicks ?
Is it simply, updating property values as in disabled mode just before the click and expect it to work normal (without turbo)?
odklizec wrote: ↑Tue Aug 13, 2019 10:03 amHi,
The Turbo mode is just a mode, with some eliminated delays. It should be enough to add these lines at start of your code modules:Default values (with disabled Turbo mode):Code: Select all
Mouse.DefaultMoveTime = 0; Keyboard.DefaultKeyPressTime = 20; Delay.SpeedFactor = 0.00;
Generally speaking, Ranorex does not encourage people to use this mode, because it could lead to some unwanted side effects. On the other hand, I found it useful especially on VMs, where it really helps with strange mouse movements and missclicks. But use it with cautionCode: Select all
Mouse.DefaultMoveTime = 0; Keyboard.DefaultKeyPressTime = 100; Delay.SpeedFactor = 1.00;
Code: Select all
void ITestModule.Run()
{
//normal speed
Mouse.DefaultMoveTime = 300;
Keyboard.DefaultKeyPressTime = 100;
Delay.SpeedFactor = 1.0;
//open browser
Host.Current.OpenBrowser("http://www.ranorex.com", "IE", "", false, false, false, false, false, true);
Delay.Milliseconds(0);
//loop some mouse actions
for (int i = 1; i < 5; i++)
{
dosteps();
}
//adjusted speed
Report.Info("SPEED TIME!");
Mouse.DefaultMoveTime = 0;
Keyboard.DefaultKeyPressTime = 20;
Delay.SpeedFactor = 0;
//loop some mouse actions
for (int i = 1; i < 5; i++)
{
dosteps();
}
}