Pointer methods, browser sessions serve 6, phone sessions 0 and computer sessions 6. A method marked not served answers StrategyUnavailable on that kind of session; check the handshake’s capabilities before relying on one.
Pointer.click
Browser: served
Phone: not served
Computer: served
Takes targetId
Move the pointer to the point and click there.
| Param | Type | Required | Description |
|---|---|---|---|
space | string | No | The space a call’s coordinates and returned bounds are in. screen is the desktop’s pixels from its top-left: the only space in a computer session, and its default there. In a browser session window (the default) is window pixels. viewport is the page’s CSS pixels from the main frame viewport’s top-left, as Playwright’s page.mouse and boundingBox use; under it a point outside the viewport fails with InvalidArgs. One of window, viewport, screen. Default "window". |
x | integer | Yes | |
y | integer | Yes | |
button | string | No | The mouse button to use. One of left, right, middle. Default "left". |
clickCount | integer | No | Clicks in quick succession; 2 is a double click. Omitted means 1. Default 1. |
modifiers | string[] | No | Modifier keys to hold. A session that cannot hold modifiers answers StrategyUnavailable. One of ctrl, shift, alt, meta. |
input | string | No | How the input reaches the page. Browsers serve os (the default), real operating system input; simulated answers StrategyUnavailable. |
idempotencyKey | string | No | Makes a re-send after a reconnect safe: a repeated key returns the recorded response without acting again. See Idempotency keys. |
| Field | Type | Description |
|---|---|---|
tookMs | integer | End-to-end time on the session. |
input | string | How the input reaches the page. Browsers serve os (the default), real operating system input; simulated answers StrategyUnavailable. |
Pointer.move
Browser: served
Phone: not served
Computer: served
Takes targetId
Move the pointer to the point without pressing a button.
| Param | Type | Required | Description |
|---|---|---|---|
space | string | No | The space a call’s coordinates and returned bounds are in. screen is the desktop’s pixels from its top-left: the only space in a computer session, and its default there. In a browser session window (the default) is window pixels. viewport is the page’s CSS pixels from the main frame viewport’s top-left, as Playwright’s page.mouse and boundingBox use; under it a point outside the viewport fails with InvalidArgs. One of window, viewport, screen. Default "window". |
x | integer | Yes | |
y | integer | Yes | |
input | string | No | How the input reaches the page. Browsers serve os (the default), real operating system input; simulated answers StrategyUnavailable. |
| Field | Type | Description |
|---|---|---|
tookMs | integer | End-to-end time on the session. |
input | string | How the input reaches the page. Browsers serve os (the default), real operating system input; simulated answers StrategyUnavailable. |
Pointer.down
Browser: served
Phone: not served
Computer: served
Takes targetId
Move the pointer to the point and press a button, holding it until Pointer.up.
| Param | Type | Required | Description |
|---|---|---|---|
space | string | No | The space a call’s coordinates and returned bounds are in. screen is the desktop’s pixels from its top-left: the only space in a computer session, and its default there. In a browser session window (the default) is window pixels. viewport is the page’s CSS pixels from the main frame viewport’s top-left, as Playwright’s page.mouse and boundingBox use; under it a point outside the viewport fails with InvalidArgs. One of window, viewport, screen. Default "window". |
x | integer | Yes | |
y | integer | Yes | |
button | string | No | The mouse button to use. One of left, right, middle. Default "left". |
modifiers | string[] | No | Modifier keys to hold. A session that cannot hold modifiers answers StrategyUnavailable. One of ctrl, shift, alt, meta. |
input | string | No | How the input reaches the page. Browsers serve os (the default), real operating system input; simulated answers StrategyUnavailable. |
idempotencyKey | string | No | Makes a re-send after a reconnect safe: a repeated key returns the recorded response without acting again. See Idempotency keys. |
| Field | Type | Description |
|---|---|---|
tookMs | integer | End-to-end time on the session. |
input | string | How the input reaches the page. Browsers serve os (the default), real operating system input; simulated answers StrategyUnavailable. |
Pointer.up
Browser: served
Phone: not served
Computer: served
Takes targetId
Move the pointer to the point and release a button held by Pointer.down.
| Param | Type | Required | Description |
|---|---|---|---|
space | string | No | The space a call’s coordinates and returned bounds are in. screen is the desktop’s pixels from its top-left: the only space in a computer session, and its default there. In a browser session window (the default) is window pixels. viewport is the page’s CSS pixels from the main frame viewport’s top-left, as Playwright’s page.mouse and boundingBox use; under it a point outside the viewport fails with InvalidArgs. One of window, viewport, screen. Default "window". |
x | integer | Yes | |
y | integer | Yes | |
button | string | No | The mouse button to use. One of left, right, middle. Default "left". |
modifiers | string[] | No | Modifier keys to hold. A session that cannot hold modifiers answers StrategyUnavailable. One of ctrl, shift, alt, meta. |
input | string | No | How the input reaches the page. Browsers serve os (the default), real operating system input; simulated answers StrategyUnavailable. |
idempotencyKey | string | No | Makes a re-send after a reconnect safe: a repeated key returns the recorded response without acting again. See Idempotency keys. |
| Field | Type | Description |
|---|---|---|
tookMs | integer | End-to-end time on the session. |
input | string | How the input reaches the page. Browsers serve os (the default), real operating system input; simulated answers StrategyUnavailable. |
Pointer.drag
Browser: served
Phone: not served
Computer: served
Takes targetId
Press a button at from, move to to, and release it there, in one call.
| Param | Type | Required | Description |
|---|---|---|---|
space | string | No | The space a call’s coordinates and returned bounds are in. screen is the desktop’s pixels from its top-left: the only space in a computer session, and its default there. In a browser session window (the default) is window pixels. viewport is the page’s CSS pixels from the main frame viewport’s top-left, as Playwright’s page.mouse and boundingBox use; under it a point outside the viewport fails with InvalidArgs. One of window, viewport, screen. Default "window". |
from | Point | Yes | A position in window pixels (the space screenshots use), (0, 0) at the top-left of the browser window. A point outside the window (negative, x at or past screenWidth, or y at or past screenHeight, from Device.info) fails with InvalidArgs. |
to | Point | Yes | A position in window pixels (the space screenshots use), (0, 0) at the top-left of the browser window. A point outside the window (negative, x at or past screenWidth, or y at or past screenHeight, from Device.info) fails with InvalidArgs. |
button | string | No | The mouse button to use. One of left, right, middle. Default "left". |
modifiers | string[] | No | Modifier keys to hold. A session that cannot hold modifiers answers StrategyUnavailable. One of ctrl, shift, alt, meta. |
input | string | No | How the input reaches the page. Browsers serve os (the default), real operating system input; simulated answers StrategyUnavailable. |
idempotencyKey | string | No | Makes a re-send after a reconnect safe: a repeated key returns the recorded response without acting again. See Idempotency keys. |
| Field | Type | Description |
|---|---|---|
tookMs | integer | End-to-end time on the session. |
input | string | How the input reaches the page. Browsers serve os (the default), real operating system input; simulated answers StrategyUnavailable. |
Pointer.wheel
Browser: served
Phone: not served
Computer: served
Takes targetId
Scroll at the point by deltaX and deltaY CSS pixels.
| Param | Type | Required | Description |
|---|---|---|---|
space | string | No | The space a call’s coordinates and returned bounds are in. screen is the desktop’s pixels from its top-left: the only space in a computer session, and its default there. In a browser session window (the default) is window pixels. viewport is the page’s CSS pixels from the main frame viewport’s top-left, as Playwright’s page.mouse and boundingBox use; under it a point outside the viewport fails with InvalidArgs. One of window, viewport, screen. Default "window". |
x | integer | Yes | |
y | integer | Yes | |
deltaX | integer | No | Horizontal scroll in CSS pixels. |
deltaY | integer | No | Vertical scroll in CSS pixels. |
modifiers | string[] | No | Modifier keys to hold. A session that cannot hold modifiers answers StrategyUnavailable. One of ctrl, shift, alt, meta. |
input | string | No | How the input reaches the page. Browsers serve os (the default), real operating system input; simulated answers StrategyUnavailable. |
idempotencyKey | string | No | Makes a re-send after a reconnect safe: a repeated key returns the recorded response without acting again. See Idempotency keys. |
| Field | Type | Description |
|---|---|---|
tookMs | integer | End-to-end time on the session. |
input | string | How the input reaches the page. Browsers serve os (the default), real operating system input; simulated answers StrategyUnavailable. |