Skip to main content
The Page class is where most of your Uplink automation happens. It provides methods for navigation, element interaction, JavaScript execution, and more.

Getting started

Create a page from a browser instance:

API categories

The Page API is organized into several categories:

Navigation

Navigate to URLs and track page loading

Interaction

Click elements, type input, and interact with the page

JavaScript

Execute JavaScript and inject user scripts

Waiting

Wait for elements, functions, and network requests

Authentication

Handle authentication flows

Cookies

Manage browser cookies

HTTP Requests

Make HTTP requests via the device

Screenshots

Capture screenshots of the page

Events

Listen to page events and lifecycle

Common workflows

User authentication + automation

Data extraction

Network monitoring

Lifecycle

Creating pages

Closing pages

Always close pages when done to free up device resources.

UI visibility

Pages can be shown or hidden without closing them:

Best practices

Always wait for elements to appear before interacting with them:
Set appropriate timeouts for navigation and operations:
Remove event listeners when done to prevent memory leaks:
Access DOM content using evaluate() rather than trying to parse HTML:

Next steps

Explore each category of the Page API:

Navigation

page.goto(), page.url(), page.progress()

Interaction

page.click(), page.input(), page.select()

JavaScript

page.evaluate(), page.addUserScript()

Waiting

page.waitForSelector(), page.waitForFunction()