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 fully supported under Python 2.7. Python 3.6+ support is still experimental

Latest PyPI version Number of PyPI downloads

Keyword Documentation

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

Installation

The recommended installation method is using pip:

pip install --upgrade robotframework-appiumlibrary

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 Driver Setup Guide. Please follow the Driver-Specific Setup according to platform.

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 Documentation

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

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

1.6

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-1.6.tar.gz (27.7 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-1.6-py2.py3-none-any.whl (49.8 kB view details)

Uploaded Python 2Python 3

File details

Details for the file robotframework-appiumlibrary-1.6.tar.gz.

File metadata

  • Download URL: robotframework-appiumlibrary-1.6.tar.gz
  • Upload date:
  • Size: 27.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.2

File hashes

Hashes for robotframework-appiumlibrary-1.6.tar.gz
Algorithm Hash digest
SHA256 d49dba1ceae73f013489159f7e474d0179d8e023cdb768d883108d78d4c5088f
MD5 c762b0113d2bae69e5ba0313a098c12a
BLAKE2b-256 b21802f56be0fda565a0ae7d7261dbd140ef6f8c5f2ae6508938747db4508952

See more details on using hashes here.

File details

Details for the file robotframework_appiumlibrary-1.6-py2.py3-none-any.whl.

File metadata

  • Download URL: robotframework_appiumlibrary-1.6-py2.py3-none-any.whl
  • Upload date:
  • Size: 49.8 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.2

File hashes

Hashes for robotframework_appiumlibrary-1.6-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 c8f025d140e22312d507bc79889ca82fc262e7eceff14061aab54cf2b09cf526
MD5 82f688c808112f44a07f4da620036068
BLAKE2b-256 7f58fc94bc6238915b314c7622631e3f42c4139d7898ba1390108bc37ac7b5b0

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