---
sourceDocument: Australia API Reference
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/api-reference

 Release :

    - australia

ft:locale :

    - en-US

ft:publication_title :

    - Australia API Reference

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# user --- user interactions

# user --- user interactions {#ariaid-title1}

Release version: Australia  
Updated June 25, 2026  
![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 minute to read  
The user API simulates realistic user interactions in a Run UI Test Script step. Each interaction fires the same events a real browser user produces, such as focus, input, change, blur, and keyboard events,
so that client scripts and reactive frameworks respond correctly.

## user methods {#r_run_ui_test_script_user__section_methods}

{#r_run_ui_test_script_user__section_methods__entry__2}

| Method | Description |
|-|-|
| user.click(el) | Single click. |
| user.dblClick(el) | Double click. |
| user.tripleClick(el) | Triple click, which selects all text in an input. |
| user.hover(el) | Move the pointer over the element. |
| user.unhover(el) | Move the pointer away from the element. |
| user.type(el, text) | Type text character by character, firing key events. |
| user.keyboard(seq) | Send a key sequence, for example `'{Enter}'`, `'{Tab}'`, or `'{Control>}a{/Control}'`. |
| user.tab(opts?) | Press Tab, or Shift+Tab with `{ shift: true }`. |
| user.clear(el) | Select all and delete the current value. |
| user.selectOptions(el, values) | Select one or more `<option>` values in a `<select>`. |
| user.deselectOptions(el, values) | Deselect options in a multi-select. |
| user.copy() | Copy the selection to the clipboard. |
| user.cut() | Cut the selection to the clipboard. |
| user.paste() | Paste from the clipboard. |
[Table 1. user methods]

## Usage {#r_run_ui_test_script_user__section_usage}

All `user.*` methods return Promises --- always `await` them.

    const field = screen.getByRole('textbox', { name: 'Short description' });
    await user.click(field);
    await user.type(field, 'Cannot connect to VPN');

`user.type` fires `keydown`, `keypress`, `input`, and `keyup` for each character. Use it when keystroke-level events matter. For long strings where only the
final value matters, use the `user.clear` and `user.type` pattern

