Skip to main content
Element Handle other methods for the Puppeteer driver.

uploadFile

Upload files to a file input element. Upstream docs
filePaths
string[]
required
await element.uploadFile(/* string[] */);

scrollIntoView

Scroll the element into view. Upstream docs
await element.scrollIntoView();

autofill

Test if the form is compatible with browser autofill. Currently supports credit card autofill in Chrome headless/headful only. Upstream docs
data
PuppeteerAutofillData
required
await element.autofill(/* PuppeteerAutofillData */);

backendNodeId

Get the backend node ID (Chrome DevTools Protocol).
This value is stable for the lifetime of the node. The SDK caches this value after the first call.
Upstream docs
result
number
Return value
await element.backendNodeId();

boundingBox

Get the bounding box of the element. Upstream docs
result
PuppeteerBoundingBox | null
Return value
await element.boundingBox();

boxModel

Get the CSS box model of the element. Upstream docs
result
PuppeteerBoxModel | null
Return value
await element.boxModel();

clickablePoint

Get a clickable point within the element. Upstream docs
offset
PuppeteerOffset
result
PuppeteerPoint
Return value
await element.clickablePoint();

contentFrame

Get the content frame for iframe elements. Upstream docs
result
RemotePuppeteerFrame | null
Return value
await element.contentFrame();

frame

Get the owning frame of this element. Upstream docs
result
RemotePuppeteerFrame
Return value
await element.frame();

drag

Drag the element to the given target. Upstream docs
target
PuppeteerPoint | HandleRef
required
Target point or element to drag to.
result
PuppeteerDragData | void
Return value
await element.drag(/* PuppeteerPoint | HandleRef */);

dragEnter

Dispatch a dragenter event.
Deprecated: dragenter is automatically performed during dragging.
Upstream docs
data
PuppeteerDragData
await element.dragEnter();

dragOver

Dispatch a dragover event.
Deprecated: dragover is automatically performed during dragging.
Upstream docs
data
PuppeteerDragData
await element.dragOver();

drop

Drop the given element onto the current one. Upstream docs
element
HandleRef
required
Element to drop.
await element.drop(/* HandleRef */);

touchStart

Start a touch in the center of the element.
Scrolls element into view if needed.
Upstream docs
result
TouchHandle
Return value
await element.touchStart();

touchMove

Move the touch to the center of the element.
Scrolls element into view if needed.
Upstream docs
touch
{ touchId?: string }
await element.touchMove();

touchEnd

End the first active touch. Upstream docs
await element.touchEnd();

toElement

Convert to a typed element handle.
Throws if the element is not of the specified tag type. Do NOT dispose the original handle - both handles reference the same element.
Upstream docs
tagName
K
required
result
RemotePuppeteerElementHandle
Return value
await element.toElement(/* K */);

asLocator

Create a Locator based on this ElementHandle.
This does not refresh the handle if stale, but allows using locator conditions.
Upstream docs
result
RemotePuppeteerLocator
Return value
await element.asLocator();

dispose

Dispose of the handle, releasing it from the backend registry.
After disposal, any method calls will throw. The SDK sets the disposed flag before the RPC call to prevent race conditions.
Upstream docs
await element.dispose();