Skip to main content

Robot Framework - Appium Extensions (Android)

Custom keywords extending Robot Framework’s AppiumLibrary, optimized for mobile automation on Android.

This library enhances the native AppiumLibrary with new gestures, UI utilities, and validation features designed for QA teams automating Android applications.
It aims to serve as an open-source reference for improving test reliability, coverage, and maintainability in mobile test automation.

PyPI version License Python


Available Keywords

  • Gestures:

    • Scroll Inside
    • Scroll To Element
    • Swipe Element
    • Perform Long Press
    • Perform Pinch
    • Perform Zoom
  • Touch utilities:

    • Click Elements
    • Tap At Percentage
    • Tap Element At Coordinates
  • Visibility & Lookup:

    • Compare Screenshots
    • Get Visible Elements On Screen
    • Wait Multiple Elements
  • System/App:

    • Change Theme
    • Get Readable Network Status
    • Terminate Application Extension

Individual documentation are in keyword docstrings.


Technology Stack

  • Python 3.9+
  • Robot Framework 4.0+
  • Appium Server 2.0+
  • UiAutomator2 driver (Android)
  • Appium-Python-Client 5.1.1+
  • Selenium W3C Actions
  • OpenCV + scikit-image + NumPy (for visual comparison)
  • ADB + Android SDK tools

Prerequisites and Requirements

  • Android device or emulator connected with ADB
  • Dependencies listed in requirements.txt
  • Appium Server running (appium or appium --allow-cors)
    npm install -g appium
    
  • UiAutomator2 driver installed (appium driver install uiautomator2)
    appium driver install uiautomator2
    

Installation

You can install the package directly from PyPI (recommended):

pip install positivo-appium-extensions

Or, if you prefer to work with the latest development version:

git clone https://github.com/<....>.git
cd robotframework-appium-extensions
pip install .

How To Run Tests

Run any .robot test suite using Robot Framework’s CLI:

robot -d results tests/robot/perform_zoom.robot
  • -d results saves logs, reports, and screenshots in a dedicated folder.
  • You can adapt paths for your test files or custom resources.

Emulator / Device Setup

To successfully run the automated tests included in this repository, ensure that the test environment (emulator or physical device) meets the following conditions:

  • Use an Android device or emulator running Android 11 or higher.
  • Before executing the test suites, verify which applications are required by the selected tests and ensure they are properly installed on the device.

    For example: some suites may require system apps such as Calculator, Google Maps, or Play Store.

  • Using a Google APIs emulator image is recommended, as minimal system images may lack these default apps.

Usage Example

*** Settings ***
Library    AppiumLibrary
Library    robotframework_appium_extensions.keywords.PerformPinch

*** Test Cases ***
Pinch Example
    Open Application    http://localhost:4723    platformName=Android    automationName=UiAutomator2
    Perform Pinch    locator=id=map_view    scale=0.6

Known Limitations

  • Platform: tested on Android 7.0+; iOS not supported.
  • Multi-touch gestures: Android 9+ recommended for reliable Pinch/Zoom (W3C Actions).
  • Device fragmentation: differences between manufacturers (Samsung/Xiaomi, etc.) may affect gesture behavior.
  • Dynamic elements: fast-moving/animated elements may require explicit waits.
  • Power saving mode: can cause inconsistencies; disable during tests.
  • Performance: image comparison may be slow on high-resolution screens.

Troubleshooting

  • Device not detected: run adb devices → enable USB Debugging; restart ADB (adb kill-server && adb start-server).
  • Appium session not starting: ensure Appium 2.x is running and uiautomator2 driver installed (appium driver install uiautomator2).
  • Element not found: validate selectors in Appium Inspector; prefer id/accessibility_id; use explicit waits.
  • Inconsistent gestures: increase duration/steps; add pauses (pause_before/pause_after); prefer Android 9+.
  • Slow/timeouts: use a good-quality USB cable; disable Android animations; increase timeouts; close background apps.
  • ADB errors: ensure adb is in your PATH; restart ADB; reconnect the device; check permissions.

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines on:

  • Code style
  • Commit messages
  • Tests and documentation
  • PR process

License

Licensed under Apache 2.0 LICENSE


Acknowledgments

This open-source repository was developed within the scope of the Technology Residency Program,
executed by CEPEDI, coordinated by SOFTEX, and supported by the Ministry of Science, Technology and Innovation (MCTI).

The development challenge addressed in this repository was proposed by Positivo Tecnologia,
a partner company of the program, as part of its collaboration with the Technology Residency initiative.

We acknowledge and thank all the institutions involved for their support in the execution and dissemination of this open-source project.

Metadata

Release files for positivo-appium-extensions 1.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for positivo-appium-extensions 1.2.1
File Size Uploaded
positivo_appium_extensions-1.2.1.tar.gz 36.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for positivo-appium-extensions 1.2.1
File Interpreter ABI Platform
positivo_appium_extensions-1.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 81.1 kB

Release files / positivo_appium_extensions-1.2.1.tar.gz

Download URL positivo_appium_extensions-1.2.1.tar.gz
Size 36.3 kB
Tags Source
SHA-256 checksum
How to use checksums
4848bf207c8815f342dd2cf8ffa7f4e2d14507716cc81f72d1168d673be831cd
BLAKE2b-256 checksum
How to use checksums
b90a90f5dd45c80d82f3cc405d21c802a3324cabca92f7c015d831b117edad9f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 5, 2025.

Transparency log

Release files / positivo_appium_extensions-1.2.1-py3-none-any.whl

Download URL positivo_appium_extensions-1.2.1-py3-none-any.whl
Size 44.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
67fbf7275fc2d8049b2584c85c76c66f870d7dcbfd724079aa83a154227e0be6
BLAKE2b-256 checksum
How to use checksums
85e31a8bf6768a577b72c5f2355e71337dc66ec5ec1a52e3a2c553796745af37
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 5, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

1.2.1 This release

2 release files

1.2.0

2 release files

1.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page