Skip to main content

Additional keywords for Robot Framework's AppiumLibrary. Developed within the Technology Residency Program executed by CEPEDI, coordinated by SOFTEX, and supported by MCTI, with the participation of Positivo Tecnologia as the partner company that proposed the development challenge.

Project description

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 robotframework-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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

robotframework_appium_extensions-1.0.0.tar.gz (38.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file robotframework_appium_extensions-1.0.0.tar.gz.

File metadata

File hashes

Hashes for robotframework_appium_extensions-1.0.0.tar.gz
Algorithm Hash digest
SHA256 15417e5a371798df33e31138b64dbf38fb50735eb8c0dd678cd29ebf27fdf287
MD5 969410fafac4129bdc046dec781c8c16
BLAKE2b-256 4ef86ea3a3314f2f8fe86a0c064b147a988a4c473f64ef0dc49e94b4ea415103

See more details on using hashes here.

File details

Details for the file robotframework_appium_extensions-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for robotframework_appium_extensions-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 80c4ef59ff2eb54be347e81cb8521c7011d1c7f547ef2bec1119307eb7bdf2e6
MD5 06dfdf504d20224f9a3861b43f8d5e3d
BLAKE2b-256 43fb03b8d4c968e60e7c01693341af214aa282154302140f7dfa31ae6ce68d34

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page