ScreenCILocator
ScreenCILocator =
Omit<Locator,"click"|"fill"|"check"|"uncheck"|"setChecked"|"tap"|"selectOption"|"selectText"|"dragTo"|LocatorReturnMethodNames|"all"|"page"> &object
Defined in: types.ts:366
Type Declaration
Section titled “Type Declaration”all():
Promise<ScreenCILocator[]>
Returns
Section titled “Returns”Promise<ScreenCILocator[]>
and(…
args):ScreenCILocator
Parameters
Section titled “Parameters”…[Locator]
Returns
Section titled “Returns”ScreenCILocator
check()
Section titled “check()”check(
options?):Promise<void>
Checks the checkbox or radio button.
Parameters
Section titled “Parameters”options?
Section titled “options?”object & object
Returns
Section titled “Returns”Promise<void>
click()
Section titled “click()”click(
options?):Promise<void>
Clicks the element with an animated cursor move.
Parameters
Section titled “Parameters”options?
Section titled “options?”object & object
Returns
Section titled “Returns”Promise<void>
describe()
Section titled “describe()”describe(…
args):ScreenCILocator
Parameters
Section titled “Parameters”…[string]
Returns
Section titled “Returns”ScreenCILocator
dragTo()
Section titled “dragTo()”dragTo(
target,options?):Promise<void>
Drags the element to the target locator with animated cursor movement.
The animation consists of:
- Cursor moves to the source element (
moveDuration,moveEasing). - A brief pause (
preDragPause) then a mouseDown. - Cursor drags from source to target (
dragDuration,dragEasing). - A mouseUp at the target.
Parameters
Section titled “Parameters”target
Section titled “target”Locator
The locator of the drop target element.
options?
Section titled “options?”Omit<{ }, "steps"> & object
Returns
Section titled “Returns”Promise<void>
fill()
Section titled “fill()”fill(
value,options?):Promise<void>
Types value character-by-character using pressSequentially.
Parameters
Section titled “Parameters”string
The text to type into the element.
options?
Section titled “options?”click?
Section titled “click?”When provided, clicks the element before typing (animated cursor move + click). No extra zoom-pan sleep is inserted.
duration?
Section titled “duration?”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.
hideMouse?
Section titled “hideMouse?”boolean
When true, the mouse cursor is hidden while
typing and shown again on the next mouse move. Defaults to false.
timeout?
Section titled “timeout?”number
Maximum time in milliseconds to wait for the element to be actionable.
Returns
Section titled “Returns”Promise<void>
filter()
Section titled “filter()”filter(…
args):ScreenCILocator
Parameters
Section titled “Parameters”…[object]
Returns
Section titled “Returns”ScreenCILocator
first()
Section titled “first()”first():
ScreenCILocator
Returns
Section titled “Returns”ScreenCILocator
getByAltText()
Section titled “getByAltText()”getByAltText(…
args):ScreenCILocator
Parameters
Section titled “Parameters”…[string | RegExp, object]
Returns
Section titled “Returns”ScreenCILocator
getByLabel()
Section titled “getByLabel()”getByLabel(…
args):ScreenCILocator
Parameters
Section titled “Parameters”…[string | RegExp, object]
Returns
Section titled “Returns”ScreenCILocator
getByPlaceholder()
Section titled “getByPlaceholder()”getByPlaceholder(…
args):ScreenCILocator
Parameters
Section titled “Parameters”…[string | RegExp, object]
Returns
Section titled “Returns”ScreenCILocator
getByRole()
Section titled “getByRole()”getByRole(…
args):ScreenCILocator
Parameters
Section titled “Parameters”…["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]
Returns
Section titled “Returns”ScreenCILocator
getByTestId()
Section titled “getByTestId()”getByTestId(…
args):ScreenCILocator
Parameters
Section titled “Parameters”…[string | RegExp]
Returns
Section titled “Returns”ScreenCILocator
getByText()
Section titled “getByText()”getByText(…
args):ScreenCILocator
Parameters
Section titled “Parameters”…[string | RegExp, object]
Returns
Section titled “Returns”ScreenCILocator
getByTitle()
Section titled “getByTitle()”getByTitle(…
args):ScreenCILocator
Parameters
Section titled “Parameters”…[string | RegExp, object]
Returns
Section titled “Returns”ScreenCILocator
hover()
Section titled “hover()”hover(
options?):Promise<void>
Hovers over the element with an animated cursor move.
Parameters
Section titled “Parameters”options?
Section titled “options?”object & object
Returns
Section titled “Returns”Promise<void>
last()
Section titled “last()”last():
ScreenCILocator
Returns
Section titled “Returns”ScreenCILocator
locator()
Section titled “locator()”locator(…
args):ScreenCILocator
Parameters
Section titled “Parameters”…[string | Locator, object]
Returns
Section titled “Returns”ScreenCILocator
nth(…
args):ScreenCILocator
Parameters
Section titled “Parameters”…[number]
Returns
Section titled “Returns”ScreenCILocator
or(…
args):ScreenCILocator
Parameters
Section titled “Parameters”…[Locator]
Returns
Section titled “Returns”ScreenCILocator
page()
Section titled “page()”page():
ScreenCIPage
Returns
Section titled “Returns”pressSequentially()
Section titled “pressSequentially()”pressSequentially(
text,options?):Promise<void>
Presses keys one by one as if on a physical keyboard.
Parameters
Section titled “Parameters”string
The text to type.
options?
Section titled “options?”object & object
Returns
Section titled “Returns”Promise<void>
selectOption()
Section titled “selectOption()”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.
Parameters
Section titled “Parameters”values
Section titled “values”string | ElementHandle<Node> | readonly string[] | { } | readonly ElementHandle<Node>[] | readonly object[] | null
The option(s) to select (value, label, index, or element).
options?
Section titled “options?”object & object
Returns
Section titled “Returns”Promise<string[]>
selectText()
Section titled “selectText()”selectText(
options?):Promise<void>
Selects all text content of the element with an animated cursor move and triple-click animation.
Parameters
Section titled “Parameters”options?
Section titled “options?”object & object
Returns
Section titled “Returns”Promise<void>
setChecked()
Section titled “setChecked()”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.
Parameters
Section titled “Parameters”checked
Section titled “checked”boolean
options?
Section titled “options?”object & object
Returns
Section titled “Returns”Promise<void>
tap(
options?):Promise<void>
Taps the element (touch event).
Parameters
Section titled “Parameters”options?
Section titled “options?”object & object
Returns
Section titled “Returns”Promise<void>
uncheck()
Section titled “uncheck()”uncheck(
options?):Promise<void>
Unchecks the checkbox.
Parameters
Section titled “Parameters”options?
Section titled “options?”object & object
Returns
Section titled “Returns”Promise<void>