Robot Framework + AppiumLibrary on a Real Cloud Phone: Full Setup (2026)
Your Robot Framework suite is green, your qa team trusts it, and it has never once touched a real phone. It runs on an emulator, the keywords pass, the report is all dots, everyone signs off. Then a real user on a real handset hits a flow your emulator never modeled, and the bug ships. This guide shows how to point Robot Framework and the AppiumLibrary at a real cloud Android phone over the network, so your keyword driven tests run on actual hardware with almost no change.
For context, I run a cloud Android farm in Singapore. Every phone is real hardware on a rack, each on its own persistent Singapore mobile ip, and Appium drives the fleet over adb.
Why network adb is the foundation
A normal Appium setup assumes a phone plugged into your machine by cable. A cloud phone has no cable. Each phone exposes an adb endpoint, a host and a port like adb-sg.cloudf.one:5555. You run adb connect against it, and from that moment standard adb tooling treats it like any other device. AppiumLibrary then drives it through Appium exactly as if it were on your desk.
Installing the tools
You need Python 3.9 or newer, then pip install robotframework and pip install robotframework-appiumlibrary. That library is the bridge between your Robot keywords and the Appium server. You also need Node 18 or newer, then npm install -g appium, then appium driver install uiautomator2. That uiautomator2 driver is the one that talks to real Android. Finally, install the Android platform tools so the adb binary is on your path, and confirm with adb version.
Connecting to the phone
Take the endpoint from your dashboard and run adb connect adb-sg.cloudf.one:5555, then adb devices to confirm it shows as device. If it says offline, wait two seconds and connect again. Once it shows up, run adb -s <endpoint> shell getprop ro.product.model and the real handset model prints back, confirming real hardware.
Start the Appium server in its own terminal with appium and leave it running. By default it listens on port 4723.
The test file
A Robot file has a settings section and a test cases section. In settings you write Library AppiumLibrary. Your first step calls Open Application, which takes the Appium server url plus named arguments for the capabilities. The key capabilities are below.
| Capability | Value | Why |
|---|---|---|
| platformName | Android | The platform |
| automationName | uiautomator2 | Talks to real Android |
| udid | adb-sg.cloudf.one:5555 | The adb endpoint, not a local serial |
| appPackage / appActivity | your app | Launch an installed app |
| newCommandTimeout | 120 | Network round trips are slower than a cable |
| systemPort | 8200, 8201, … | Unique per parallel session |
Keep those capabilities out of the test body. Put the server url and the udid in a variables section or a separate variables file, so the same suite targets a different phone by changing one value. That one habit is what lets the same file run against any phone in the fleet.
A concrete login test case
You start with Open Application using the url and capabilities. Then Wait Until Element Is Visible with the locator for the username field. AppiumLibrary locators are simple: id= and the resource id, accessibility_id= and the content description, or xpath=. So Input Text into the username field, Input Text into the password field, Click Element on the login button by its accessibility id, then Wait Until Page Contains Element with the nav bar locator and a ten second timeout. Finally, in a teardown, Close Application so the session releases the phone.
Never use a hard coded Sleep to wait for a screen. Always use a Wait Until keyword, because there is a network hop between your runner and the device, and fixed sleeps are flaky.
Because this is a real phone on a real mobile ip, the app’s anti fraud checks see a normal Singapore handset, not an emulator fingerprint. Many apps now refuse to run on emulators, checking build props like ro.kernel.qemu or a generic model name. On a real cloud phone there is nothing to detect.
To find locators, run Appium Inspector pointed at the same capabilities. It shows a live view of the phone with every element id, text, and accessibility id. Copy them straight into your Robot locators.
Running across the fleet
Robot has a companion tool called pabot that runs suites in parallel. List your fleet from the api, get back a set of adb endpoints, and run one suite per endpoint, each with its own udid value. Ten phones, ten parallel suites, one test file. Give each session a unique systemPort, because the uiautomator2 instances otherwise collide on the same port and you get flaky teardown errors.
The failures you will hit
Device offline: if a session dies mid run, adb sometimes marks the endpoint offline. Wrap your setup in a small retry that runs adb disconnect, then adb connect, then waits two seconds. Slow first command: the first Appium command after connect takes longer because uiautomator2 installs its server apk on the phone, so raise uiautomator2ServerLaunchTimeout to 60. Leaked sessions: always Close Application in a Test Teardown, because a leaked session holds the phone and the next run cannot grab it.
Wiring it into ci
Since the phone is just a network endpoint, your ci runner needs no usb hardware. Install Python, Robot Framework, AppiumLibrary, Node, Appium, and the driver. Export your token, call the api to lock a device, run adb connect, run robot against your suite, then unlock the device in a cleanup step that always runs. The whole job runs on a plain cloud runner, which is what makes real device testing cheap enough for every pull request.
Try it on a real phone
If you want phones to point Robot Framework at, that is exactly what I run: real cloud Android phones in Singapore on dedicated hardware, each with a persistent Singapore mobile ip, an adb endpoint per phone, and an api to list and lock the fleet. Start at cloudf.one and use code YT30 for thirty percent off your first month.
Get new guides and videos first — join the Telegram channel.