Robot Framework - How to start with Appiuum Library?

后端 未结 2 1377
感情败类
感情败类 2021-01-17 00:18

I am trying automate Mobile application using AppiumLibrary in Robot Framework. Can anybody help me how to start with installing the Appium library in robot framework?

相关标签:
2条回答
  • 2021-01-17 00:47

    Run the following command in cmd after installing robotframework-appiumlibrary:

    pip install --upgrade robotframework-appiumlibrary
    

    It solved the same issue which I experienced.

    0 讨论(0)
  • 2021-01-17 00:48

    May be this can give you a head start, below are some key concepts to start with.

    What is Appium ?

    Appium works like a server, written in Nodejs and implements selenium webdriver . it allows the client (test cases written in any language, Robotframework in your case ) to fire the tests and the target application ( Apps) acts like a web page . Target application sends back the response to node js server which in turn send it back to client.

    here is an excellent link which can help you to understand the basic concept of appium in more details

    https://automationlab0000.wordpress.com/2018/09/10/appium/

    Android SDK

    You need to install android SDK as it provides many set of tools to help in automation, one such tool is adb, it detect your mobile devices, assign device id to them, which will be referenced by your scripting language for further communication with appium.

    Client

    Third point is client i.e. Robot Framework. You need to install appium library first

    pip install robotframework-appiumlibrary
    

    once you have library installed you can use it to send request to appium server.

    here is a sample programe to open dialer in phone

    *** Settings ***
    Documentation    This script starts apps on two phones
    Library           AppiumLibrary
    Library          Collections
    
    *** Variables ***
    ${APPIUM_SERVER1}    http://0.0.0.0:4723/wd/hub
    
    
    
    *** Test cases ***
    Test
        setup and open android phone1
    
    
    *** Keywords ***
    setup and open android phone1
        ${androiddriver1}=    Open Application    ${APPIUM_SERVER1}    platformName=android    platformVersion=7.0    deviceName=f1232233    automationName=uiautomator2
        ...    appPackage=com.samsung.android.contacts    newCommandTimeout=2500    appActivity=com.android.dialer.DialtactsActivity
        Set Suite Variable    ${androiddriver1}
    
    0 讨论(0)
提交回复
热议问题