Class library usage, coding and language questions.
- Posts: 2
- Joined: Wed Feb 22, 2017 9:08 am
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 1169 times
Ranorex = 6.2.1
.NET = 4.0.30319.42000
OS = Win 10 DE
- Posts: 227
- Joined: Thu Feb 23, 2017 10:37 am
- Location: Benedikt, Slovenia
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.
Now track over to the IMDB webpage into the Search window and click the left mouse button to track the object.
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.
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.
- Ranorex Guru
- Posts: 4532
- Joined: Mon Aug 13, 2012 9:54 am
- Location: Zilina, Slovakia
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
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