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.2.0.tar.gz (4.4 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.2.0.tar.gz.

File metadata

File hashes

Hashes for robotframework_androiduiautomation-0.2.0.tar.gz
Algorithm Hash digest
SHA256 21e9c7016473f2d8981555fc92dc6f59836d0f0babd441e8d8ce9cf56a9a78e4
MD5 b7eba6a8ccc99fc534198a77baeaf69a
BLAKE2b-256 d59436b3417e010ab4358550e504b692b8f17debfd244792a344b0c3f321da27

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for robotframework_androiduiautomation-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 451b7289cc676b003a1dbdc9c7449b5e18e14991e644ea8e0275da937f0bb450
MD5 49c71d18fd7427013fa4f02d29e24585
BLAKE2b-256 a556899100402b77c73aaacd248cb03c8ac344f997d23055e230c701bfb31ece

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