How to press number keys in Ranorex using code?

Best practices, code snippets for common functionality, examples, and guidelines.
Madhumita Ghosh3
Posts: 8
Joined: Mon Dec 19, 2016 8:53 am

How to press number keys in Ranorex using code?

Post by Madhumita Ghosh3 » Thu Mar 23, 2017 5:52 am

Hi Team,

Please let me know how to press number keys in ranorex using code. I want to press Ctrl+1 using code.

Thanks in advance,
Madhumita Ghosh.

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

Re: How to press number keys in Ranorex using code?

Post by odklizec » Thu Mar 23, 2017 8:44 am

Hi,

The easiest way to learn the code behind a specific Ranorex action is to add action (in this case Key Shortcut action) to recording and then simply view the code via context menu >> "View Code". Eventually, you can convert the action to user code.
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

User avatar
Stub
Posts: 515
Joined: Fri Jul 15, 2016 1:35 pm

Re: How to press number keys in Ranorex using code?

Post by Stub » Thu Mar 23, 2017 9:06 am

That's how I learned how to write Ranorex code, via the code behind recordings. Very instructive.