Package: robotframework-appiumlibrary
IntroductionAppiumLibraryis an appium testing library forRobot Framework. Library can be downloaded fromPyPI.It usesAppiumto communicate with Android and iOS application
similar to howSelenium WebDrivertalks to web browser.It is supporting Python 3.7+ (since Appium Python Client doesn’t support Python 2.7 anymore)ContentsIntroductionKeyword DocumentationInstallationDevice SetupUsageContributingProject ContributorsKeyword DocumentationSeeKeyword Documentationfor available keywords and more information about the library in general.InstallationThe recommended installation method is usingpip:pip install --upgrade robotframework-appiumlibrarySeeRobot Framework installation instructionsfor detailed information
about installing Python and Robot Framework itself.Device SetupAfter 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 inAppium Driver Setup Guide.
Please follow theDriver-Specific Setupaccording to platform.UsageTo write tests with Robot Framework and AppiumLibrary,
AppiumLibrary must be imported into your RF test suite.
SeeRobot Framework User Guidefor more information.As it uses Appium make sure your Appium server is up and running.
For how to use Appium please refer toAppium DocumentationWhen 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 likeInput Textare primarily
used by higher level keywords likeInput Search Query.*** Settings ***DocumentationSimple example using AppiumLibraryLibraryAppiumLibrary*** 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 valueOpen Test ApplicationInput Search QueryHello World!Submit SearchSearch Query Should Be MatchingHello World!*** Keywords ***Open Test ApplicationOpen Applicationhttp://127.0.0.1:4723/wd/hubautomationName=${ANDROID_AUTOMATION_NAME}
  ...platformName=${ANDROID_PLATFORM_NAME}platformVersion=${ANDROID_PLATFORM_VERSION}
  ...app=${ANDROID_APP}appPackage=io.appium.android.apisappActivity=.app.SearchInvokeInput Search Query[Arguments]  ${query}Input Texttxt_query_prefill${query}Submit SearchClick Elementbtn_start_searchSearch Query Should Be Matching[Arguments]  ${text}Wait Until Page Contains Elementandroid:id/search_src_textElement Text Should Beandroid:id/search_src_text${text}Create a file with the content above (name it:test_file.robot) and execute:robot test_file.robotThe above example is single file test case, more examples can be found in asample projectthat illustrates using
Robot Framework and AppiumLibrary. Check the sample project that you can find examples of mobile web & ios & android.ContributingFork the project, make a change, and send a pull request!Project ContributorsSerhat BolsuWilliam ZhangXie LiepingJari NurminenAppiumLibrary is modeled after (and forked from)appiumandroidlibrary,  but re-implemented to use appium 1.X technologies.