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

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

positivo_appium_extensions-1.2.0.tar.gz (36.0 kB view details)

Uploaded Source

Built Distribution

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

positivo_appium_extensions-1.2.0-py3-none-any.whl (44.5 kB view details)

Uploaded Python 3

File details

Details for the file positivo_appium_extensions-1.2.0.tar.gz.

File metadata

File hashes

Hashes for positivo_appium_extensions-1.2.0.tar.gz
Algorithm Hash digest
SHA256 16bd02f5ce9972d059a011d98f886ad3343332c3536df354eb60593c979d02f0
MD5 eac6c55e0b682badfec81c334b9ec929
BLAKE2b-256 0eb62a749c0e9f095b959e6d177fbbfa412a14c86e9865dad555f672f52fa41c

See more details on using hashes here.

Provenance

The following attestation bundles were made for positivo_appium_extensions-1.2.0.tar.gz:

Publisher: python-publish.yml on lucasdeeiroz/positivo-appium-extensions

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file positivo_appium_extensions-1.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for positivo_appium_extensions-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8907aae86faa5b1aa7d63eb4e5467db7bc38eab3682606d7d346903408cdcbd0
MD5 057278ac3f5a0a55286d3c1bdd8fd493
BLAKE2b-256 0170cd71b9a04a96ed2b2c0d528eaf389a5501c05c4b027984b9922f9eb7af4b

See more details on using hashes here.

Provenance

The following attestation bundles were made for positivo_appium_extensions-1.2.0-py3-none-any.whl:

Publisher: python-publish.yml on lucasdeeiroz/positivo-appium-extensions

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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