问卷点击题目提交答案

#!/bin/bash
#uiautomator获取页面元素,元素是否在该页,判断进行点击事件测试
ip151=10.66.209.151
#mkdir ip132
#adb -s $ip134 shell am start -n com.guoming.health.device.voiceskill/com.guoming.health.device.voiceskill.video.ui.ConstactsHomeActivity
echo “输入1为刷卡模式”
echo “输入2为手机号”
echo “输入3为极简模式”
read -p “请您输入1-6任意字符:” NUM
ip=D66PFEVWSWAYH6EM
function card()
{
#刷卡模式
adb -s $ip shell uiautomator dump /data/local/tmp/app.uix
#cd ip132/
if [ $? -ne 0 ]; then
echo “fail”
else
#adb pull /data/local/tmp/app.uix
#text=cat app.uix|grep -ai "请刷卡获取号码" |cut -c 2992-3012
text=adb -s $ip shell cat /data/local/tmp/app.uix|grep -ai "请刷卡获取号码" |cut -c 2992-3012
if [ “$text” = “请刷卡获取号码” ] ; then
echo “进入成功”
adb -s $ip shell input text 1111111111111111111111111111111111111111111111111
#诊前检查页面,确认用户信息后,点击开始检测,调用zhenqiancheck函数
zhenqiancheck
else
echo $text fail
fi
fi
}
function phonenumber()
{
#手机号模式
adb -s $ip shell uiautomator dump /data/local/tmp/app.uix
if [ $? -ne 0 ]; then
echo “fail”
else
#adb pull /data/local/tmp/app.uix
#text=cat app.uix|grep -ai "请输入您的手机号" |cut -c 4880-4903
text=adb -s $ip shell cat /data/local/tmp/app.uix|grep -ai "请输入您的手机号" |cut -c 4880-4903
if [ “$text” = “请输入您的手机号” ] ; then
echo “进入成功”
adb -s $ip shell input text 15195899250
#诊前检查页面,确认用户信息后,点击开始检测,调用zhenqiancheck函数
else
echo $text fail
fi
fi
}
function jijian()
{
#极简模式
adb -s $ip shell uiautomator dump /data/local/tmp/app.uix
if [ $? -ne 0 ]; then
echo “fail”
else
#adb pull /data/local/tmp/app.uix
#text=cat app.uix |cut -c 3302-3319|grep -ai "中医舌脉检查"
text=adb -s $ip shell cat /data/local/tmp/app.uix |cut -c 3302-3319|grep -ai "中医舌脉检查"
if [ “$text” = “中医舌脉检查” ] ; then
echo “进入成功”
adb -s $ip shell input tap 512 314
else
echo $text fail
fi
fi
}
function zhenqiancheck()
{
#诊前检查页面,确认用户信息后,点击开始检测
sleep 5
adb -s $ip shell uiautomator dump /data/local/tmp/app.uix
if [ $? -ne 0 ]; then
echo “fail”
else
text=adb -s $ip shell cat /data/local/tmp/app.uix |cut -c 6016-6027|grep -ai "开始检测"
if [ “$text” = “开始检测” ] ; then
echo “进入成功”
adb -s $ip shell input tap 512 520
else
echo $text fail
fi
fi
}
function gangliefuzheng()
{
#问卷肛裂复诊
i=1
#while [ $i -le 4 ]
#do
adb -s i p s h e l l u i a u t o m a t o r d u m p / d a t a / l o c a l / t m p / a p p . u i x i f [ " ip shell uiautomator dump /data/local/tmp/app.uix if [ " ipshelluiauto

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值