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
Wait for elements before interacting
Wait for elements before interacting
Always wait for elements to appear before interacting with them:
Handle timeouts
Handle timeouts
Set appropriate timeouts for navigation and operations:
Clean up event listeners
Clean up event listeners
Remove event listeners when done to prevent memory leaks:
Use evaluate for DOM access
Use evaluate for DOM access
Access DOM content using
evaluate() rather than trying to parse HTML: