Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Recording keyboard typing

During the recording, BugBug will automatically record everything you type in the text fields. You don't need to activate anything.

You can later edit the recorded text manually if needed. Typing is reflected by Type text type of action.

Did you know? When running a test, BugBug will simulate every keystroke, as if the user was really typing the text letter by letter. Learn more about running tests.

Recording keys

When you type in a field during recording, BugBug records the text and special keys such as Enter, Tab, Escape, Backspace and arrows in a Type text step. After Enter or Tab, the next keys you type start a new step. Keys pressed together with Ctrl or Command (⌘) are not recorded.

Pressing keys in a test

There is no separate "press key" step. To press a key, use a Type text step and put a key sequence in its value, for example {enter}, {tab} or {esc}. The value can contain only the sequence, or text and sequences together, such as running shoes{enter}.

Key
Sequence
Key
Sequence

Enter

{enter}

Arrow left

{left}

Tab

{tab}

Arrow right

{right}

Escape

{esc}

Arrow up

{up}

Backspace

{backspace}

Arrow down

{down}

Delete

{delete}

Home

{home}

Page Up

{pageup}

End

{end}

Page Down

{pagedown}

Space

a space

How it works

  • The keys go to the step's element. Select the element that should receive the keys, such as the input, the slider handle or the menu. With the Element has focus waiting condition, which is on by default for Type text, BugBug focuses the element first if it isn't focused.

  • Every key event must reach that element. If focus moves to another element in the middle of the value, the step fails with EVENT_DISPATCHED_ON_INVALID_ELEMENT. Put {tab} at the end of the value, and start a new Type text step for the next field.

  • Keys are pressed one by one. Each key is pressed and released before the next one, so sequences like {ctrl} don't hold the key down for the next character.

Good to know

  • Password fields. Text typed into a password field (<input type="password">) is saved as a secret value, so it's hidden in the step.

  • Password managers. Don't fill fields with a password manager while recording. BugBug turns off the autofill of the password managers it detects, because it changes the page. See Other browser extensions can change the page.

  • Variables. To type a value that changes in every run, such as a unique email, insert a variable with Variables in the recording overlay.

FAQ

How do I press Enter, Tab or Escape in a test?

Add a Type text step on the element that should receive the key, and set its value to {enter}, {tab} or {esc}. There is no separate "press key" step. See Pressing keys in a test.

How do I press an arrow key on a focused element, for example a slider?

Add a Type text step with the element's selector and the value {right} (or {left}, {up}, {down}). Repeat the sequence to press it several times, for example {right}{right}{right}.

Can I press key combinations like Ctrl+A or Ctrl+C?

Not with Type text: it presses and releases each key separately. To clear a field, use a Clear input step. To paste, use Paste from clipboard.

Last updated

Was this helpful?