Page 1 of 1

Recording Tab key actions

Posted: Tue Mar 08, 2016 3:04 pm
by Eamonn
Is it true that Tab key or Shift-Tab key stokes cannot be recorded in a Recorded Module? Following on this point then how a Tab key or Shift-Tab keyboard action is included in a Ranorex Recorded module is by modifying the Recorded Module to include Key Shortcut actions with a Press Key Code and record the Tab keystroke at this point?

Re: Recording Tab key actions

Posted: Tue Mar 08, 2016 3:43 pm
by odklizec
Hi,

I don't see a reason why Ranorex should not record Tab or Shift+Tab combination? Is this a behavior you experiencing? What's your Ranorex version? I just tried it with Ranorex 5.4.5 and it correctly recorded Tab or Shift+Tab key sequence.

Re: Recording Tab key actions

Posted: Tue Mar 08, 2016 5:29 pm
by Eamonn
I have Ranorex 5.4.4 I have it working now. It did not work for me first time so I believed it did not work and so began using the Key Shortcut action.
I created a new module and then began recording. I enabled the hot keys on the Recorder dialog and then began pressing the Tab key then stopped the recording and noticed no actions had been recorded in the new Recording Module. I now realise that I needed to click on the website to bring the focus to the webpage. What was happening was that the tab key actions were moving focus from one element to the next of the Recorder dialog rather than on the webpage I wished to test.

Re: Recording Tab key actions

Posted: Tue Mar 08, 2016 7:01 pm
by krstcs
Honestly, I find it much faster to manually create modules instead of using the recorder. You have much more control over what is actually done. Once you understand how Ranorex uses XPath and Regex and what the actions really do, you can make modules very quickly and know that they do exactly what you want.

And I've found that it is usually better to use Key Shortcuts when using special keys or single key-stroke actions so you don't have to worry about escaping the keys like you do when they are done in a Key Sequence action.


My recommendation is always that you keep your modules as short as possible. I try to keep mine to one action set, such as "Click_OKButton" or "Enter_Username". That is all they do, just click the OK button, or enter the username. Then, just drag-and-drop them into the test cases as needed and use the test cases as your flow path. It means there are more modules, but you know EXACTLY what each one does and can organize them better. Smaller modules are also much more re-usable so you get more bang-for-you-buck.

Re: Recording Tab key actions

Posted: Wed Mar 09, 2016 4:32 pm
by Eamonn
I will take your advice on-board, thank you.