Skip to main content

Robot Framework Mobile app testing library for Appium Client Android & iOS & Web

Project description

Introduction

AppiumLibrary is an appium testing library for Robot Framework. Library can be downloaded from PyPI.

It uses Appium to communicate with Android and iOS application similar to how Selenium WebDriver talks to web browser.

It is supporting Python 3.9+ and Appium Python Client 5.1.1+

Latest PyPI version Number of PyPI downloads License

Keyword Documentation

See Keyword Documentation for available keywords and more information about the library in general.

Installation

Option 1 (recommended)

The recommended installation method is using pip:

pip install --upgrade robotframework-appiumlibrary

Option 2

It is possible to install directly from GitHub repository. To Install latest source from the master branch, use this command: pip:

pip install git+https://github.com/serhatbolsu/robotframework-appiumlibrary.git

Please note that installation will take some time, because pip will clone the AppiumLibrary project to a temporary directory and then perform the installation.

See Robot Framework installation instructions for detailed information about installing Python and Robot Framework itself.

Device Setup

After installing the library, you still need to setup an simulator/emulator or real device to use in tests. iOS and Android have separate paths to follow, and those steps better explained in Appium Quickstart Intro. Please follow the Driver-Specific Setup according to platform.

[As we make updates to the AppiumLibrary we want to provide current and helpful documentation with regards to setting up not only devices but the full development environment. I’ll note personally I found this to be a bit overwhelming and complex - doable but lengthy. Once source which greatly helped me is the RoboCon 2024 workshop notes provide by the team at Eficode. This information may be incorporated here in the future.]

Usage

To write tests with Robot Framework and AppiumLibrary, AppiumLibrary must be imported into your RF test suite. See Robot Framework User Guide for more information.

As it uses Appium make sure your Appium server is up and running. For how to use Appium please refer to Appium Quickstart Intro.

When using Robot Framework, it is generally recommended to write tests easy to read/modify. The keywords provided in AppiumLibrary are pretty low level. It is thus typically a good idea to write tests using Robot Framework’s higher level keywords that utilize AppiumLibrary keywords internally. This is illustrated by the following example where AppiumLibrary keywords like Input Text are primarily used by higher level keywords like Input Search Query.

*** Settings *** Documentation Simple example using AppiumLibrary Library AppiumLibrary *** Variables *** ${ANDROID_AUTOMATION_NAME} UIAutomator2 ${ANDROID_APP} ${CURDIR}/demoapp/ApiDemos-debug.apk ${ANDROID_PLATFORM_NAME} Android ${ANDROID_PLATFORM_VERSION} %{ANDROID_PLATFORM_VERSION=11} *** Test Cases *** Should send keys to search box and then check the value Open Test Application Input Search Query Hello World! Submit Search Search Query Should Be Matching Hello World! *** Keywords *** Open Test Application Open Application http://127.0.0.1:4723/wd/hub automationName=${ANDROID_AUTOMATION_NAME} ... platformName=${ANDROID_PLATFORM_NAME} platformVersion=${ANDROID_PLATFORM_VERSION} ... app=${ANDROID_APP} appPackage=io.appium.android.apis appActivity=.app.SearchInvoke Input Search Query [Arguments] ${query} Input Text txt_query_prefill ${query} Submit Search Click Element btn_start_search Search Query Should Be Matching [Arguments] ${text} Wait Until Page Contains Element android:id/search_src_text Element Text Should Be android:id/search_src_text ${text}

Create a file with the content above (name it: test_file.robot) and execute:

robot test_file.robot

The above example is single file test case, more examples can be found in a sample project that illustrates using Robot Framework and AppiumLibrary. Check the sample project that you can find examples of mobile web & ios & android.

Contributing

Fork the project, make a change, and send a pull request!

Project Contributors

William Zhang

akupahkala

Arnaud Ruffin

Serhat Bolsu

soukingang

Junuen Villa

Xie Lieping

Erik Bartalos

Tanakiat Srisaranyakul

Joshua Rivera

Minh Nguyen

Thiago Paiva Brito

js361014

Sadik Kuzu

Jonathan Gayvallet

matthew-dahm

KumarS

jennyw1

JMcn

Xia Clark

ac-simoes

Ulhas Deshmukh

Leon Guo

Pramod

smaspe

eXtReMaL

Erol Selitektay

Filipe Arruda

Felipe Luiz Tortella

Filipe Henrique Benjamim de Arruda

Gaja

Gabriela Simion

Christoph Singer

Eslam Elmishtawy

Ed Manlove

AppiumLibrary is modeled after (and forked from) appiumandroidlibrary, but re-implemented to use appium 1.X technologies.

Project details


Release history Release notifications | RSS feed

This version

3.1

Download files

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

Source Distribution

robotframework_appiumlibrary-3.1.tar.gz (39.3 kB view details)

Uploaded Source

Built Distribution

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

robotframework_appiumlibrary-3.1-py3-none-any.whl (46.9 kB view details)

Uploaded Python 3

File details

Details for the file robotframework_appiumlibrary-3.1.tar.gz.

File metadata

File hashes

Hashes for robotframework_appiumlibrary-3.1.tar.gz
Algorithm Hash digest
SHA256 1a8a262f1d1a32122d7fcb2e504bad9e370f23a6138c1147468baddcd92a29b6
MD5 aef7198c18a0811052d565dcef7178b1
BLAKE2b-256 45f945a445841abcbe575c07f0f7eeb026f2c7be10304ff0c570850ac2942e17

See more details on using hashes here.

File details

Details for the file robotframework_appiumlibrary-3.1-py3-none-any.whl.

File metadata

File hashes

Hashes for robotframework_appiumlibrary-3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a20e7179e6652506c4b1b286f9030c832d6ddb38ae48bd42030350aad12f14ce
MD5 38efb4bf50bcd84ce401303d3d0efcca
BLAKE2b-256 5e35bca0799b2fc60177ba6d597a06fbf893febacc29da6e6e37b38bfc8e58a8

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