Keyboard shortcuts as a workaround in browser automation
How to use keyboard shortcuts as a workaround in browser automation: install the Chrome extension, click Build from description, tell the agent what you want, and follow its prompts. A working bot is built and tested in minutes.
Here is how the automation works. To use keyboard shortcuts in browser automation, add a Press key(s) step, click record and press the keys. The automation presses them on the page as a person would, which gets you past an element you cannot select: arrow keys scroll a box, Tab moves between fields, Enter submits.
Build the keyboard shortcut from a description
Describe it and click the button: the agent builds and tests the shortcut in your Chrome extension. Most shortcuts act on whatever has focus, so a Click element step usually comes first to put the cursor in the right place.
- Go to the page I give you
- Click inside the box with the scrollbar
- Press the down arrow key to scroll it
Have the URL of the page and know which element the shortcut should act on: the box to scroll, the field to tab out of, the message box to submit.
Build the keyboard shortcut step by step
The steps the agent builds, as the Builder shows them: each step by its name, with the fields to set under it. Add them yourself in this order in the step-by-step builder, or open the agent's result there to adjust it.
- 1.0
Go to pageURL: the page with the scrolling box
- 2.0
Click elementSelect: a point inside the box you want to scroll
- 3.0
Press key(s)Key: the recorded down arrow key
Common questions about keyboard shortcuts in browser automation
Why does the Press key(s) step do nothing?
The cursor is not where the shortcut needs it. Add a Click element step just before Press key(s) to click the box or field the keys are for. When a run fails, hand it to the agent and it repairs the step.
What keyboard shortcuts work as workarounds in browser automation?
The ones a person uses to move around a page without the mouse.
| Keyboard shortcut | What it does in an automation |
|---|---|
| Up and down arrows | Scroll a page or a box with scrollbars |
| Left and right arrows | Move the cursor left or right in an input field |
| Tab | Move the cursor between fields in a form, or between elements in a pop-up |
| Enter | Submit a message in a chat interface, or press a button |
| Ctrl+C, then Ctrl+V | Copy and paste, as a person would |
| Delete | Delete the value in a text field |
How do I hold Ctrl or Shift while pressing another key?
Record them together in one Press key(s) step. Ctrl, Alt and Shift stay held down until the end of the recorded sequence.
Can I press keys from data in a Google Sheet?
Yes. Insert the data in the step's Data field: its contents are entered as key presses and overwrite any recorded sequence. Separate each key press with the Delimiter, which is || by default.
How do I slow down the key presses?
Raise Delay, the time between each key press in milliseconds. It is 10 by default.
Can I submit a form or a chat message with the Enter key?
Yes. Click the field with Click element first, then record Enter in Press key(s); the automation presses it as a person would, which submits the message or presses the form's button.
Can I use keyboard shortcuts in an automation without code?
Yes. Press key(s) records the keys you press; there is no code to write. Describe the page and the keys above and the agent builds it, or add the three steps yourself.
Where do I get help?
Get in touch with support, or ask in the axiom.ai community.
Related guides
Close cookie pop-ups and notification prompts automatically
- Open the site's login page
- If a cookie window appears, reject the cookies
- Carry on either way
- Then sign in with my saved login
Clear text from an input field before typing
- Go to the form page I give you
- Clear the text already in the name field
- Type the new name into that field
Send X (Twitter) DMs from a Google Sheet
- Open each X profile link in my sheet
- If the profile has a Message button, click it
- Type my message and send it
- Delete the profile from the sheet once done