airtest adb发送短信

 

 

# dev = connect_device("Android:///")
connect_device("Android:///")
dev = device()

phone = '13800138000'
msg = 'hello world'

def sendMsg(phone, msg):
    info = dev.shell(f'am start -a android.intent.action.SENDTO -d sms:{phone} --es sms_body "{msg}"')
    touch(Template(r"tpl1671441182775.png", record_pos=(0.403, 0.936), resolution=(720, 1600)))
    
sendMsg(phone, msg)

  

posted @ 2022-12-20 11:06  zyip  阅读(28)  评论(0编辑  收藏  举报