Skip to main content

Robot Framework library for Android automation using uiautomator2

Project description

android_ui_automation

Python library for Android UI automation using uiautomator2, fully compatible with Robot Framework.

Installation

Install from PyPI:

pip install robotframework-androiduiautomation

Or install locally for development:

git clone https://github.com/ValterIversen/android_ui_automation
cd android_ui_automation
pip install -e .

uiautomator2 will be installed automatically as a dependency.


Usage in Robot Framework

Settings

*** Settings ***
Library    AndroidUiAutomation

Variables

*** Variables ***
${DEVICE}    emulator-5554
${APP}       com.example.app

Test Case Example

*** Test Cases ***
Open App And Click Button
    [Documentation]    Example test to open an app, click a button, type keys, and use system buttons
    Connect Device    ${DEVICE}
    Open App    ${APP}
    Type Keys    INPUT
    Click By Text    Confirm
    Press Back Button
    Close App    ${APP}

Features

  • Connect to Android devices/emulators
  • Launch and close apps
  • Wait for elements (Text or XPath) to appear/disappear
  • Click by text or XPath
  • Get and set text
  • Type keys
  • Press Android system buttons (Home, Back, Menu)
  • Fully compatible with Robot Framework keyword-style usage
  • All public Python methods automatically become RF keywords

Notes

  • System buttons have friendly aliases:
    • Press Home Button
    • Press Back Button
    • Press Menu Button

📌 Example Project (Base Template)

To see a complete working example using this library, check out the base project:

👉 https://github.com/ValterIversen/RobotFramework-UiAutomatorLibrary

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_androiduiautomation-0.1.9.tar.gz (4.5 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_androiduiautomation-0.1.9.tar.gz.

File metadata

File hashes

Hashes for robotframework_androiduiautomation-0.1.9.tar.gz
Algorithm Hash digest
SHA256 eae5c753b0704a240218b34310a7e58ac378ce91401f4e43075891dfae05722b
MD5 2c286214d02355db202fd7419cf10c61
BLAKE2b-256 a081a662513f143ec36a57d4779a40c3f98f607d1a211a6799490f19757012cc

See more details on using hashes here.

File details

Details for the file robotframework_androiduiautomation-0.1.9-py3-none-any.whl.

File metadata

File hashes

Hashes for robotframework_androiduiautomation-0.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 433e4a7e3cef3970292dc19014e3d23925e786742a4b79864978face37594320
MD5 221073214e91f68f6a2e00594e8b8f15
BLAKE2b-256 736d006b9fb287f3adbf831dd0b53022ce5ad2db96eaa1f1c7be6b99778f44e9

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