Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
robotframework-appiumlibrary
Advanced tools
Robot Framework Mobile app testing library for Appium Client Android & iOS & Web
AppiumLibrary_ is an appium testing library for Robot Framework
. Library can be downloaded from PyPI.
It uses Appium <http://appium.io/>
_ to communicate with Android and iOS application
similar to how Selenium WebDriver talks to web browser.
It is supporting Python 3.7+ (since Appium Python Client doesn't support Python 2.7 anymore)
.. image:: https://img.shields.io/pypi/v/robotframework-appiumlibrary.svg :target: https://pypi.python.org/pypi/robotframework-appiumlibrary/ :alt: Latest PyPI version
.. image:: https://img.shields.io/pypi/dm/robotframework-appiumlibrary.svg :target: https://pypi.python.org/pypi/robotframework-appiumlibrary/ :alt: Number of PyPI downloads
.. image:: https://img.shields.io/badge/License-Apache%202.0-blue.svg :target: https://opensource.org/licenses/Apache-2.0 :alt: License
.. contents::
See Keyword Documentation
_ for available keywords and more information about the library in general.
Option 1 (recommended)
The recommended installation method is using
pip <http://pip-installer.org>
__::
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 <http://pip-installer.org>
__::
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.
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.
To write tests with Robot Framework and AppiumLibrary,
AppiumLibrary must be imported into your RF test suite.
See Robot Framework User Guide <https://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html>
_
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 <http://appium.io/docs/en/about-appium/getting-started/>
_
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
.
.. code:: robotframework
*** 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.
Fork the project, make a change, and send a pull request!
============== ==================== ============ 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 ============== ==================== ============
AppiumLibrary is modeled after (and forked from) appiumandroidlibrary <https://github.com/frankbp/robotframework-appiumandroidlibrary>
_, but re-implemented to use appium 1.X technologies.
.. _AppiumLibrary: https://github.com/serhatbolsu/robotframework-appiumlibrary .. _Robot Framework: https://robotframework.org .. _Keyword Documentation: http://serhatbolsu.github.io/robotframework-appiumlibrary/AppiumLibrary.html .. _PyPI: https://pypi.org/project/robotframework-appiumlibrary/ .. _Robot Framework installation instructions: https://github.com/robotframework/robotframework/blob/master/INSTALL.rst .. _Appium Driver Setup Guide: http://appium.io/docs/en/about-appium/getting-started/?lang=en .. _sample project: https://github.com/serhatbolsu/robotframework-appium-sample
FAQs
Robot Framework Mobile app testing library for Appium Client Android & iOS & Web
We found that robotframework-appiumlibrary demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.