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?
How can I scroll the Page Down?
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
Page Down is \e00f
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.
**NOTE** The "id=" value is not required.
You may need to add a waitforElement or pause command, depending on your script and the next steps in your wokflow.
When using the following Code values, make sure to only include the Exxx values and to include a backslash before the E. i.e.: \E00F
|
|
|
|
|
If you need to scroll down on a Web Page, you can use the Page Down or Page Up keyboard keys with keyDown and keyUp.