You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

31 lines
1.4 KiB

*** Settings ***
Library AppiumLibrary
*** Keywords ***
用户打开小程序
#UI自动化,连接设备
Open Application http://127.0.0.1:4723/wd/hub platformName=Android platformVersion=7.1.2 deviceName=127.0.0.1:5555
#... appPackage=com.tencent.mm appActivity=ui.LauncherUI #打开微信
Click Element xpath=//android.widget.TextView[@text='微信' and @content-desc='微信'] #打开微信
sleep 2
Click Element xpath=//android.widget.ImageView[@resource-id='com.tencent.mm:id/he6'] #点击搜索
#Click Element xpath=//android.widget.EditText[@resource-id='com.tencent.mm:id/bxz'] #点击文本输入框
sleep 1
Input Text xpath=//android.widget.EditText[@resource-id='com.tencent.mm:id/bxz'] 盒版拼拼 #文本框输入:盒版拼拼
Click Element xpath=//android.widget.TextView[@text='盒版拼拼'] #点击搜索的结果
sleep 1
#Close Application
微信一键登录
输入手机号获取验证码
登录
重新进入小程序
#重新进入小程序
Click Element xpath=//android.widget.ImageButton[@content-desc='更多'] #点击“...”
sleep 1
Click Element xpath=//android.support.v7.widget.RecyclerView[@resource-id='com.tencent.mm:id/ab8']/android.widget.LinearLayout[4]/android.widget.RelativeLayout[1]/android.widget.ImageView[2] #重新进入小程序
sleep 1
Close Application