In AppNeta Experience, we have a selenium script which requires us to use a keyboard command.
How can we delete or backspace to remove text from a field in Selenium?
Or can we hit TAB to move to the next field?
Or can we submit the login using Enter instead of clicking the submit button?
The commands you are looking for is keyDown and keyUp. These commands requires specifying the correct value.
So as indicated above, ENTER is \e007.
Space is \e00D
Delete is \e017
Backspace is \e003
Escape is \e00C
Tab is \e004
When using the command, you can specify the target, or use a click command with a target preceding the keyDown.
Use also keyUp to let go of the key command you specifed.
You may need to add a waitforElement or pause command, depending on your script and the next steps in your wokflow.
|
|
|
|
|