1. *** Settings ***
    2. Library AppiumLibrary
    3. *** Test Cases ***
    4. 打开小程序
    5. goto_miniapp
    6. *** Keywords ***
    7. goto_miniapp
    8. Open Application http://localhost:4723/wd/hub
    9. ... noReset=True # 不清除app数据
    10. ... unicodeKeyboard=True #使用unicode输入法
    11. ... resetKeyboard=True #重置输入法
    12. ... platformName=Android
    13. ... deviceName=127.0.0.1:62001
    14. ... automationName=appium
    15. ... appPackage=com.tencent.mm
    16. ... appActivity=com.tencent.mm.ui.LauncherUI
    17. Wait Until Page Contains 发现 10
    18. Log 登录成功
    19. Click Element android=UiSelector().text("发现")
    20. Wait Until Page Contains 小程序
    21. Click Element android=UiSelector().text("小程序")
    22. Wait Until Page Contains 我的小程序
    23. Click Element android=UiSelector().description("搜索")
    24. Wait Until Element Is Visible android=UiSelector().text("搜索小程序") 10
    25. Input Text android=UiSelector().text("搜索小程序") 肌肉爆震
    26. Click Element android=UiSelector().text("肌肉爆震")
    27. Wait Until Element Is Visible android=UiSelector().className("android.widget.Button").textContains("肌肉爆震") 10
    28. Click Element android=UiSelector().className("android.widget.Button").textContains("肌肉爆震")
    29. Wait Until Page Contains 首页 10

    20200526_170836_Trim.mp4 (6.74MB)