TestProject Forum

How to do multiple key presses including alphanumeric when not selecting any elements?

Hey guys, if I want to simulate key strokes done on a website I am only able to do so for pre-defined keys such as “LEFT_CONTROL” and “LEFT_ALT” or at least that is the way I have tried it.

What I am trying to do is to simulate a user pressing CTRL+ALT+R or CTRL+ALT+S at the same time when they are on a webpage as these simultaneous key presses kick off certain actions on our website.

I have tried using “SEND KEYS” but it only works if an element that supports key inputs is selected and this does not suit my use case. I have tried using the “press and hold key” addon but it only supports a set list of pre-defined keys, not alpha-numeric keys. Is there a way to simulate these key presses by a user using TestProject without having to select an element first?

An example work flow would be:

  1. User opens site
  2. User inputs username
  3. User inputs password
  4. User clicks login
  5. User presses CTRL+ALT+R

Help with this would be highly appreciated!

Hello @michael.matusowsky
You can try to Press And Hold them.
For example
image

image

And then use the Type text on the entire body to send the R key to the application
image

image

Hey @ran.tzur I tried the above and unfortunately it didn’t work. Hopefully in the future there will be an option or addon that can simulate a “press and hold key” function for alphanumeric keyboard buttons.

We made a workaround on our website to test the functionality by adding clickable buttons instead. Thanks for the help though!