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, compatible with Robot Framework.

Installation

You can install the library via pip:

pip install robotframework-androiduiautomation

Or install locally for development:

git clone <your-repo-url>
cd robotframework-androiduiautomation
pip install -e .

Make sure uiautomator2 is 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, XPath, UiSelector) to appear/disappear
  • Click elements by text, XPath, or UiSelector
  • Get and set text
  • Press keys or system buttons (Home, Back, Menu)
  • Fully compatible with Robot Framework keywords

Notes

  • All Python public methods are automatically available as Robot Framework keywords.
  • Some system buttons have friendlier aliases: Press Home Button, Press Back Button, Press Menu Button.
  • Set ROBOT_LIBRARY_SCOPE = GLOBAL to maintain device connection across multiple tests.

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.4.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.1.4.tar.gz.

File metadata

File hashes

Hashes for robotframework_androiduiautomation-0.1.4.tar.gz
Algorithm Hash digest
SHA256 8766a73a8e95783841c9d0e35b774686b4021d81fe2339ce75b1a803b6f926cc
MD5 a8d5fba4c8f878db3e735e29ce32b733
BLAKE2b-256 540f783c65dae71bf5a513024d3ae6104bbd8e8a52fee79ee57673409080245d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for robotframework_androiduiautomation-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 a4ad7de71200755416b00480fa2be7a51dc110a2419e5a8cf9887da01be487b9
MD5 3da4ae57a65d7f132797fc5fd6932334
BLAKE2b-256 56db4692858b75c22ef1e9b07f304d9d4a0e5ed812dd350424ef70c9f1c25ebe

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