Recording Tab key actions

Ask general questions here.
Eamonn
Posts: 59
Joined: Wed Jul 16, 2014 9:30 am
Location: Dundalk, Ireland.

Recording Tab key actions

Post by Eamonn » Tue Mar 08, 2016 3:04 pm

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?

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

Re: Recording Tab key actions

Post by odklizec » Tue Mar 08, 2016 3:43 pm

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.
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

Eamonn
Posts: 59
Joined: Wed Jul 16, 2014 9:30 am
Location: Dundalk, Ireland.

Re: Recording Tab key actions

Post by Eamonn » Tue Mar 08, 2016 5:29 pm

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.

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

Re: Recording Tab key actions

Post by krstcs » Tue Mar 08, 2016 7:01 pm

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.
Shortcuts usually aren't...

Eamonn
Posts: 59
Joined: Wed Jul 16, 2014 9:30 am
Location: Dundalk, Ireland.

Re: Recording Tab key actions

Post by Eamonn » Wed Mar 09, 2016 4:32 pm

I will take your advice on-board, thank you.