HoTo speed up Key Sequence?

Class library usage, coding and language questions.
Posts: 3
Joined: Wed Feb 22, 2017 9:08 am

HoTo speed up Key Sequence?

Post by Weissvonnix » Wed Feb 22, 2017 10:04 am

Hi all,
I read a lot about time settings of mouse & keyboard actions, but I couldn't get very short input times by using the action "Key Sequence". At which places I can change the input timing?

What I did:
- set the default time of mouse & keyboard within the "Init()" method of my module

Code: Select all

- all "Key Sequence" actions have the same properties regarding the timing (pls. have a look at attached image)
  • Duration = 1ms
  • Press Time = 1ms
- project settings - tab "Advanced": the value of the property "Delay before pressing a key sequence (ms)" = 0

From this point I don't know more places to change the time for input text into fields. :?

What else I can do? My goal is to put the text into input fields of dialogs/forms at once and not character-wise. It would be perfect to not see the input action on the screen. I don't want to simulate a humen typing speed. The machine should be faster by setting the text into the fields.

Thank you in advance.
properties of the Key Sequence action
PropOfKeySequence.JPG (14.73 KiB) Viewed 2301 times
my environment:
Ranorex = 9.2.0
.NET = 4.0.30319.42000
OS = Win 10 DE (x64)

Posts: 297
Joined: Thu Feb 23, 2017 10:37 am
Location: Benedikt, Slovenia

Re: HoTo speed up Key Sequence?

Post by McTurtle » Thu Feb 23, 2017 11:45 am

Hello Niko,

I recommend using the "Set value" action instead of the "Key Sequence". Below is a short example using IMDB webpage and the Firefox browser.

We must first create a repository object. Click on the track button in the repository view as in the below screenshot. You could also use the Ranorex spy for this.
NotMuchYet.png (25.15 KiB) Viewed 2291 times
Now track over to the IMDB webpage into the Search window and click the left mouse button to track the object.
imdb.png (701.21 KiB) Viewed 2291 times
Now drag and drop the tracked object from the repository into the action table and navigate through Set Value->TagValue. With this you create an action that will set the value of the attribute "TagValue" of the search filed of the main page of IMDB.
Draganddrop.png (70.77 KiB) Viewed 2291 times
The only thing left to do now is to set it to the value you want. At this point you can also use a variable.



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

Re: HoTo speed up Key Sequence?

Post by odklizec » Thu Feb 23, 2017 1:08 pm


Using SetValue is definitely faster than using Key Sequence. However, it's not entirely user-like input and so it should be used with caution. The drawback of SetValue action is that it does not trigger mouse, keyboard and other events! So if there are attached some scripts depending on onpress, onchange and other events, they may not be fired while using SetValue action! Hence it's better to user SetValue only if you are absolutely sure it works with your GUI and without unwanted/unexpected consequences ;)
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