***
title: Playwright Page
description: Complete Page method reference for the Playwright driver.
----------------------------------------------------------------------
All `Page` methods available when using the **Playwright** driver.
Access via `runtime.page` after launching a Playwright runtime.
Every method below is a remote call. The SDK translates it into a structured step sent to a single endpoint:
```
POST /v1/workspaces/{workspaceId}/execute
```
```json
{
"runtime": "my-browser",
"steps": [
{
"call": "page.goto",
"args": ["https://example.com"]
}
]
}
```
The `call` field maps directly to the method name. `args` is a JSON array of the method's arguments. You can batch multiple steps in one request.
## Navigation
### goto(url, options?)
Navigate to a URL.
```ts
await runtime.page.goto('...');
```
| Parameter | Type | Required | Description |
| --------- | ----------------------- | -------- | ----------- |
| `url` | `string` | Yes | — |
| `options` | `PlaywrightGotoOptions` | No | — |
**Returns** `PlaywrightResponse \| null`
— The main resource response, or null if navigating to about:blank.
[Upstream docs](https://playwright.dev/docs/api/class-page#page-goto)
***
### reload(options?)
Reload the page.
```ts
await runtime.page.reload();
```
| Parameter | Type | Required | Description |
| --------- | ----------------------------- | -------- | ----------- |
| `options` | `PlaywrightNavigationOptions` | No | — |
**Returns** `PlaywrightResponse \| null`
[Upstream docs](https://playwright.dev/docs/api/class-page#page-reload)
***
### goBack(options?)
Navigate back in history.
```ts
await runtime.page.goBack();
```
| Parameter | Type | Required | Description |
| --------- | ----------------------------- | -------- | ----------- |
| `options` | `PlaywrightNavigationOptions` | No | — |
**Returns** `PlaywrightResponse \| null`
[Upstream docs](https://playwright.dev/docs/api/class-page#page-go-back)
***
### goForward(options?)
Navigate forward in history.
```ts
await runtime.page.goForward();
```
| Parameter | Type | Required | Description |
| --------- | ----------------------------- | -------- | ----------- |
| `options` | `PlaywrightNavigationOptions` | No | — |
**Returns** `PlaywrightResponse \| null`
[Upstream docs](https://playwright.dev/docs/api/class-page#page-go-forward)
***
### waitForURL(url, options?)
Wait for the main frame to navigate to the given URL.
```ts
await runtime.page.waitForURL(/* url */);
```
| Parameter | Type | Required | Description |
| --------- | ------------------------------------------------ | -------- | ----------- |
| `url` | `string \| RegExp \| ((url: URL) => boolean)` | Yes | — |
| `options` | `PlaywrightWaitForURLOptions` | No | — |
[Upstream docs](https://playwright.dev/docs/api/class-page#page-wait-for-url)
***
### waitForLoadState(state?, options?)
Wait for the required load state to be reached.
State can be 'load', 'domcontentloaded', or 'networkidle'.
```ts
await runtime.page.waitForLoadState();
```
| Parameter | Type | Required | Description |
| --------- | ----------------------------------- | -------- | ----------- |
| `state` | `LoadState` | No | — |
| `options` | `PlaywrightWaitForLoadStateOptions` | No | — |
[Upstream docs](https://playwright.dev/docs/api/class-page#page-wait-for-load-state)
***
### waitForNavigation(options?)
Wait for the main frame navigation and return the main resource response.
Deprecated: This method is inherently racy. Use page.waitForURL() instead.
```ts
await runtime.page.waitForNavigation();
```
| Parameter | Type | Required | Description |
| --------- | ------------------------------------ | -------- | ----------- |
| `options` | `PlaywrightWaitForNavigationOptions` | No | — |
**Returns** `PlaywrightResponse \| null`
[Upstream docs](https://playwright.dev/docs/api/class-page#page-wait-for-navigation)
***
## Page Info
### title()
Get the page title.
```ts
await runtime.page.title();
```
**Returns** `string`
[Upstream docs](https://playwright.dev/docs/api/class-page#page-title)
***
### url()
Get the current URL.
```ts
await runtime.page.url();
```
**Returns** `string`
[Upstream docs](https://playwright.dev/docs/api/class-page#page-url)
***
### content()
Get the full HTML content of the page.
```ts
await runtime.page.content();
```
**Returns** `string`
[Upstream docs](https://playwright.dev/docs/api/class-page#page-content)
***
### setContent(html, options?)
Set the HTML content of the page.
```ts
await runtime.page.setContent('...');
```
| Parameter | Type | Required | Description |
| --------- | ----------------------------- | -------- | ----------- |
| `html` | `string` | Yes | — |
| `options` | `PlaywrightSetContentOptions` | No | — |
[Upstream docs](https://playwright.dev/docs/api/class-page#page-set-content)
***
### setViewportSize(viewportSize)
Set the viewport size.
```ts
await runtime.page.setViewportSize(/* PlaywrightViewportSize */);
```
| Parameter | Type | Required | Description |
| -------------- | ------------------------ | -------- | ----------- |
| `viewportSize` | `PlaywrightViewportSize` | Yes | — |
[Upstream docs](https://playwright.dev/docs/api/class-page#page-set-viewport-size)
***
### viewportSize()
Get the viewport size.
```ts
runtime.page.viewportSize();
```
**Returns** `PlaywrightViewportSize \| null`
[Upstream docs](https://playwright.dev/docs/api/class-page#page-viewport-size)
***
### isClosed()
Check if the page is closed.
```ts
runtime.page.isClosed();
```
**Returns** `boolean`
[Upstream docs](https://playwright.dev/docs/api/class-page#page-is-closed)
***
## Actions
### click(selector, options?)
Click on an element matching the selector.
Deprecated: Use locator.click() instead.
```ts
await runtime.page.click('...');
```
| Parameter | Type | Required | Description |
| ---------- | ------------------------ | -------- | ----------- |
| `selector` | `string` | Yes | — |
| `options` | `PlaywrightClickOptions` | No | — |
[Upstream docs](https://playwright.dev/docs/api/class-page#page-click)
***
### dblclick(selector, options?)
Double-click on an element matching the selector.
Deprecated: Use locator.dblclick() instead.
```ts
await runtime.page.dblclick('...');
```
| Parameter | Type | Required | Description |
| ---------- | --------------------------- | -------- | ----------- |
| `selector` | `string` | Yes | — |
| `options` | `PlaywrightDblclickOptions` | No | — |
[Upstream docs](https://playwright.dev/docs/api/class-page#page-dblclick)
***
### fill(selector, value, options?)
Fill an input element with the given value.
Deprecated: Use locator.fill() instead.
```ts
await runtime.page.fill('...', '...');
```
| Parameter | Type | Required | Description |
| ---------- | ----------------------- | -------- | ----------- |
| `selector` | `string` | Yes | — |
| `value` | `string` | Yes | — |
| `options` | `PlaywrightFillOptions` | No | — |
[Upstream docs](https://playwright.dev/docs/api/class-page#page-fill)
***
### type(selector, text, options?)
Type text into an element (sends keydown, keypress/input, keyup events for each character).
Deprecated: Use locator.pressSequentially() instead.
```ts
await runtime.page.type('...', '...');
```
| Parameter | Type | Required | Description |
| ---------- | ----------------------- | -------- | ----------- |
| `selector` | `string` | Yes | — |
| `text` | `string` | Yes | — |
| `options` | `PlaywrightTypeOptions` | No | — |
[Upstream docs](https://playwright.dev/docs/api/class-page#page-type)
***
### press(selector, key, options?)
Focus an element and press a key combination.
Deprecated: Use locator.press() instead.
```ts
await runtime.page.press('...', '...');
```
| Parameter | Type | Required | Description |
| ---------- | ------------------------ | -------- | ----------- |
| `selector` | `string` | Yes | — |
| `key` | `string` | Yes | — |
| `options` | `PlaywrightPressOptions` | No | — |
[Upstream docs](https://playwright.dev/docs/api/class-page#page-press)
***
### hover(selector, options?)
Hover over an element.
Deprecated: Use locator.hover() instead.
```ts
await runtime.page.hover('...');
```
| Parameter | Type | Required | Description |
| ---------- | ------------------------ | -------- | ----------- |
| `selector` | `string` | Yes | — |
| `options` | `PlaywrightHoverOptions` | No | — |
[Upstream docs](https://playwright.dev/docs/api/class-page#page-hover)
***
### focus(selector, options?)
Focus on an element.
Deprecated: Use locator.focus() instead.
```ts
await runtime.page.focus('...');
```
| Parameter | Type | Required | Description |
| ---------- | ------------------------ | -------- | ----------- |
| `selector` | `string` | Yes | — |
| `options` | `PlaywrightFocusOptions` | No | — |
[Upstream docs](https://playwright.dev/docs/api/class-page#page-focus)
***
### tap(selector, options?)
Tap on an element (for touch devices).
Deprecated: Use locator.tap() instead.
```ts
await runtime.page.tap('...');
```
| Parameter | Type | Required | Description |
| ---------- | ---------------------- | -------- | ----------- |
| `selector` | `string` | Yes | — |
| `options` | `PlaywrightTapOptions` | No | — |
[Upstream docs](https://playwright.dev/docs/api/class-page#page-tap)
***
### check(selector, options?)
Check a checkbox or radio button.
Deprecated: Use locator.check() instead.
```ts
await runtime.page.check('...');
```
| Parameter | Type | Required | Description |
| ---------- | ------------------------ | -------- | ----------- |
| `selector` | `string` | Yes | — |
| `options` | `PlaywrightCheckOptions` | No | — |
[Upstream docs](https://playwright.dev/docs/api/class-page#page-check)
***
### uncheck(selector, options?)
Uncheck a checkbox.
Deprecated: Use locator.uncheck() instead.
```ts
await runtime.page.uncheck('...');
```
| Parameter | Type | Required | Description |
| ---------- | ------------------------ | -------- | ----------- |
| `selector` | `string` | Yes | — |
| `options` | `PlaywrightCheckOptions` | No | — |
[Upstream docs](https://playwright.dev/docs/api/class-page#page-uncheck)
***
### setChecked(selector, checked, options?)
Set the checked state of a checkbox.
Deprecated: Use locator.setChecked() instead.
```ts
await runtime.page.setChecked('...', true);
```
| Parameter | Type | Required | Description |
| ---------- | ----------------------------- | -------- | ----------- |
| `selector` | `string` | Yes | — |
| `checked` | `boolean` | Yes | — |
| `options` | `PlaywrightSetCheckedOptions` | No | — |
[Upstream docs](https://playwright.dev/docs/api/class-page#page-set-checked)
***
### selectOption(selector, values, options?)
Select one or more options in a \