Click Action without mouse activity

Ranorex Spy, Recorder, and Studio.
roxter
Posts: 22
Joined: Thu May 12, 2016 10:18 am

Click Action without mouse activity

Post by roxter » Wed May 25, 2016 2:50 pm

Hi!
I am working on a recorded test case. How can I perform a click action on e.g. a button without the need mouse interaction to safe time while executing the test?

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Click Action without mouse activity

Post by krstcs » Wed May 25, 2016 3:59 pm

You can use the InvokeAction.Click() action.

However, I would caution that this action does NOT fire any events. Sometimes the SUT requires the mouse or keyboard event to be fired in order to trigger other events. Since this action does not do that, it might not work the way you want.


Remember, automation is not so much about going fast, but about being consistent. Speed comes from consistency, because the computer won't make mistakes the way a manual tester would. So, going faster is good, but it shouldn't be the primary goal.
Shortcuts usually aren't...

roxter
Posts: 22
Joined: Thu May 12, 2016 10:18 am

Re: Click Action without mouse activity

Post by roxter » Wed Jun 01, 2016 3:43 pm

Hi!
Well maybe I should rephrase my question. Is there a way to skip the recorded mouse movements?
Actually it is the cursor movement that takes additional time. I recently tested another test automation tool which is able to skip the cursor movement.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3921
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Click Action without mouse activity

Post by odklizec » Wed Jun 01, 2016 3:55 pm

Hi,

You can do this via Global Settings >> Recorder Defaults tab >> set Mouse move time per action to 0. Also make sure there is enabled "Use timings also for recorded actions" option. I believe Turbo mode button (available for recordings) have the same effect? This option is good if you want per-module control over the mouse action speed or ignored delays.

In case of code modules, you can use this code:

Code: Select all

Mouse.DefaultMoveTime = 0;
Attachments
MouseMoveTime.png
MouseMoveTime.png (19.12 KiB) Viewed 939 times
Pavel Kudrys
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