Robot Framework Appium Library is a mobile app testing library for Robot Framework, enabling test automation for Android and iOS applications. It acts as an Appium client, communicating with the Appium server to control mobile devices, similar to how Selenium WebDriver interacts with web browsers. The library is actively maintained, with frequent updates, including recent major versions that bring compatibility with newer Python, Appium Python Client, Selenium, and Robot Framework versions.
pip install robotframework-appiumlibraryVerified import paths — ran on the pinned version, not inferred.
This Robot Framework example demonstrates opening and closing a sample Android application using AppiumLibrary. Before running, ensure an Appium server is running (e.g., on http://127.0.0.1:4723) and a compatible Android emulator/device is set up with developer options enabled. The `ANDROID_APP` variable should point to your application's `.apk` file. The `Open Application` keyword initializes the session with desired capabilities.
Migrate to new assertion keywords like `Expect Element` and `Expect Text` (replacing `Element Should Be Enabled/Disabled/Visible`, `Text Should Be Visible`). For element attribute checks, use `Element Attribute Should Match`. For `Long Press`, the `Tap` keyword now supports a time parameter.
Replace removed keywords with their modern alternatives (e.g., `Click Button` -> `Click Element`). For `Launch Application` and `Quit Application`, consider `Activate Application` and `Close Application` respectively. Adjust `Swipe` calls to use named arguments.
Refactor tests to use newer W3C ActionChain-based keywords for complex gestures and adopt the renamed application management keywords. For newer AppiumLibrary versions (v3.0.0+), `TouchAction` based keywords are completely removed.
Upgrade `robotframework-appiumlibrary` to version 3.0.0 or later, as it addresses this incompatibility. Alternatively, downgrade `Appium-Python-Client` to a version less than 4.0.0 (e.g., `pip install --force-reinstall "Appium-Python-Client<4.0.0"`).