Robot Framework Appium Library

3.2.1 · active · verified Thu Apr 16

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.

Common errors

Warnings

Install

Imports

Quickstart

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.

*** Settings ***
Documentation    Simple example using AppiumLibrary.
Library          AppiumLibrary

*** Variables ***
${APPIUM_SERVER_URL}      http://127.0.0.1:4723/wd/hub
${ANDROID_AUTOMATION_NAME}    UIAutomator2
${ANDROID_PLATFORM_NAME}      Android
${ANDROID_PLATFORM_VERSION}    %{ANDROID_PLATFORM_VERSION=11}  # Example: read from ENV or default to 11
${ANDROID_APP}            ${CURDIR}/demoapp/ApiDemos-debug.apk  # Replace with your app path

*** Test Cases ***
Should Open And Close Test Application
    Open Test Application
    Sleep    3s
    Close Application

*** Keywords ***
Open Test Application
    Open Application    ${APPIUM_SERVER_URL}
    ...    automationName=${ANDROID_AUTOMATION_NAME}
    ...    platformName=${ANDROID_PLATFORM_NAME}
    ...    platformVersion=${ANDROID_PLATFORM_VERSION}
    ...    app=${ANDROID_APP}
    ...    appPackage=io.appium.android.apis
    ...    appActivity=.app.SearchInvoke

view raw JSON →