click
Clicks on the element.Waits for actionability checks, scrolls element into view,
and uses Page.mouse to click in the center of the element.
dblclick
Double-clicks on the element.Performs two clicks with a short delay, simulating a native double-click.
Waits for actionability checks before performing the action.
fill
Fills an input or textarea element with the specified value.This method waits for actionability checks, focuses the element,
fills it, and triggers an input event. It clears the existing value before filling.
Works with <input>, <textarea>, and [contenteditable] elements.
Value to fill in
clear
Clears the input field.Waits for actionability checks, focuses the element,
clears it, and triggers an input event.
press
Presses a single key or key combination.Focuses the element, then uses keyboard.down() and keyboard.up().
Supports modifier keys like Control, Shift, Alt, Meta.
Key to press (e.g., “Enter”, “Control+A”)
pressSequentially
Types text character by character with keydown, keypress, and keyup events.Use this for special keyboard handling. In most cases, fill() is preferred.
The delay option can simulate realistic typing speed.
Characters to type
type
Types text into the element (DEPRECATED - use fill() or pressSequentially()).This method is deprecated. Use fill() for most cases,
or pressSequentially() when special keyboard handling is required.
hover
Hovers over the element.Waits for actionability checks, scrolls element into view,
and moves mouse to the center of the element.
tap
Performs a tap gesture on the element.Requires hasTouch option to be enabled in browser context.
Waits for actionability checks before performing the tap.
focus
Focuses the element. Upstream docsblur
Removes focus from the element. Upstream docscheck
Checks a checkbox or radio button.If already checked, this method does nothing.
uncheck
Unchecks a checkbox.If already unchecked, this method does nothing.
setChecked
Sets the checked state of a checkbox or radio button. Upstream docsWhether to check or uncheck
selectOption
Selects option(s) in a <select> element.Waits for actionability checks, waits until all options are present,
and triggers change and input events. Returns array of selected option values.
Options to select by value, label, or index
Return value
setInputFiles
Sets files for a file input element.Pass empty array to clear selected files.
Supports paths, objects with name/mimeType/buffer, or directories.
File paths or file objects to upload
dragTo
Drags this element to the target element.Performs mousedown on source, moves to target, and releases with mouseup.
Supports sourcePosition and targetPosition options for precise control.
Target locator to drag to
scrollIntoViewIfNeeded
Scrolls the element into view if not already visible.Uses IntersectionObserver to determine if element is already visible.
dispatchEvent
Programmatically dispatches a DOM event on the element.The event is created as composed, cancelable, and bubbles by default.
Works regardless of element visibility state.
DOM event type (e.g., “click”, “dragstart”)
Event initialization properties

