Skip to content

ScreenCILocator

ScreenCILocator = Omit<Locator, "click" | "fill" | "check" | "uncheck" | "setChecked" | "tap" | "selectOption" | "selectText" | "dragTo" | LocatorReturnMethodNames | "all" | "page"> & object

Defined in: types.ts:366

all(): Promise<ScreenCILocator[]>

Promise<ScreenCILocator[]>

and(…args): ScreenCILocator

…[Locator]

ScreenCILocator

check(options?): Promise<void>

Checks the checkbox or radio button.

object & object

Promise<void>

click(options?): Promise<void>

Clicks the element with an animated cursor move.

object & object

Promise<void>

describe(…args): ScreenCILocator

…[string]

ScreenCILocator

dragTo(target, options?): Promise<void>

Drags the element to the target locator with animated cursor movement.

The animation consists of:

  1. Cursor moves to the source element (moveDuration, moveEasing).
  2. A brief pause (preDragPause) then a mouseDown.
  3. Cursor drags from source to target (dragDuration, dragEasing).
  4. A mouseUp at the target.

Locator

The locator of the drop target element.

Omit<{ }, "steps"> & object

Promise<void>

fill(value, options?): Promise<void>

Types value character-by-character using pressSequentially.

string

The text to type into the element.

ClickBeforeFillOption

When provided, clicks the element before typing (animated cursor move + click). No extra zoom-pan sleep is inserted.

number

Total time in milliseconds to spend typing (default: 1000). The per-keystroke delay is derived from this value divided by the number of characters. Has no effect on empty strings.

boolean

When true, the mouse cursor is hidden while typing and shown again on the next mouse move. Defaults to false.

number

Maximum time in milliseconds to wait for the element to be actionable.

Promise<void>

filter(…args): ScreenCILocator

…[object]

ScreenCILocator

first(): ScreenCILocator

ScreenCILocator

getByAltText(…args): ScreenCILocator

…[string | RegExp, object]

ScreenCILocator

getByLabel(…args): ScreenCILocator

…[string | RegExp, object]

ScreenCILocator

getByPlaceholder(…args): ScreenCILocator

…[string | RegExp, object]

ScreenCILocator

getByRole(…args): ScreenCILocator

…["alert" | "alertdialog" | "application" | "article" | "banner" | "blockquote" | "button" | "caption" | "cell" | "checkbox" | "code" | "columnheader" | "combobox" | "complementary" | "contentinfo" | "definition" | "deletion" | "dialog" | "directory" | "document" | "emphasis" | "feed" | "figure" | "form" | "generic" | "grid" | "gridcell" | "group" | "heading" | "img" | "insertion" | "link" | "list" | "listbox" | "listitem" | "log" | "main" | "marquee" | "math" | "meter" | "menu" | "menubar" | "menuitem" | "menuitemcheckbox" | "menuitemradio" | "navigation" | "none" | "note" | "option" | "paragraph" | "presentation" | "progressbar" | "radio" | "radiogroup" | "region" | "row" | "rowgroup" | "rowheader" | "scrollbar" | "search" | "searchbox" | "separator" | "slider" | "spinbutton" | "status" | "strong" | "subscript" | "superscript" | "switch" | "tab" | "table" | "tablist" | "tabpanel" | "term" | "textbox" | "time" | "timer" | "toolbar" | "tooltip" | "tree" | "treegrid" | "treeitem", object]

ScreenCILocator

getByTestId(…args): ScreenCILocator

…[string | RegExp]

ScreenCILocator

getByText(…args): ScreenCILocator

…[string | RegExp, object]

ScreenCILocator

getByTitle(…args): ScreenCILocator

…[string | RegExp, object]

ScreenCILocator

hover(options?): Promise<void>

Hovers over the element with an animated cursor move.

object & object

Promise<void>

last(): ScreenCILocator

ScreenCILocator

locator(…args): ScreenCILocator

…[string | Locator, object]

ScreenCILocator

nth(…args): ScreenCILocator

…[number]

ScreenCILocator

or(…args): ScreenCILocator

…[Locator]

ScreenCILocator

page(): ScreenCIPage

ScreenCIPage

pressSequentially(text, options?): Promise<void>

Presses keys one by one as if on a physical keyboard.

string

The text to type.

object & object

Promise<void>

selectOption(values, options?): Promise<string[]>

Selects an option in a <select> element.

Note: the native dropdown UI is not rendered — the option is selected programmatically. If options.click is provided, the cursor is animated to the select element before the selection is applied, but no dropdown will appear on screen.

string | ElementHandle<Node> | readonly string[] | { } | readonly ElementHandle<Node>[] | readonly object[] | null

The option(s) to select (value, label, index, or element).

object & object

Promise<string[]>

selectText(options?): Promise<void>

Selects all text content of the element with an animated cursor move and triple-click animation.

object & object

Promise<void>

setChecked(checked, options?): Promise<void>

Sets the checked state of a checkbox or radio element. Delegates to the instrumented check() or uncheck() based on checked.

boolean

object & object

Promise<void>

tap(options?): Promise<void>

Taps the element (touch event).

object & object

Promise<void>

uncheck(options?): Promise<void>

Unchecks the checkbox.

object & object

Promise<void>