Understanding the key concepts of Uplink’s mobile automation platform
Uplink’s architecture revolves around four core concepts: Clients, Devices (Workers), Browsers, and Pages. Understanding how these components work together is essential for effective automation.
The Client is your main entry point for Uplink automation. It manages the WebSocket connection to the Uplink relay server and provides methods for launching browsers and managing devices.
A Device (also called a Worker) represents a physical mobile device connected to your session. Each device can host multiple browser instances.
// Get all connected workersconst workers = client.workers()// Or listen for workers as they connectclient.on('worker-connected', (worker) => { console.log('Worker connected:', worker.address)})// Get device information from a workerconst worker = workers[0]const info = await worker.getDeviceInfo()// { deviceModel, platform, platformVersion, deviceType }
Device characteristics:
Each device has a unique address for identification
Devices can be iOS or Android
Multiple browsers can run on a single device
Devices connect through either the SDK or Connect app
A Browser represents a browser instance running on a device. Each browser can have multiple pages (tabs) open simultaneously.
// Launch a new browserconst browser = await client.launch()// Or launch on a specific deviceconst browser = await device.launch()// Connect to an existing browserconst browser = await client.connect('browser-handle')// List all browsers on a deviceconst browsers = await client.browsers()
A Page represents a browser tab or window. This is where most of your automation happens—navigation, interaction, JavaScript execution, and more.
// Create a new pageconst page = await browser.newPage()// Navigate and interactawait page.goto('https://example.com')await page.click('#button')const title = await page.evaluate(() => document.title)// List all pages in a browserconst pages = await browser.pages()
Page characteristics:
Pages are isolated from each other
Each page has its own JavaScript context
Pages can be shown/hidden independently
Event listeners can be attached to monitor page activity
A Session is the authenticated connection that ties everything together. Sessions are created programmatically using your API key and provide the communication channel between your code and the devices.