from airtest.core.api import *
# 通过ADB连接本地Android设备
connect_device("Android:///")
#安装待测软件apk,路径信息。
install("path/to/your/apk")
#开始运行app
start_app("com.pingan.certicationApp")
#点击某个图片,Airtest中基于图像识别语法,图片自己提供。
touch(Template("image_of_a_button.png"))
#滑动语音,开头图片跟结尾图片
swipe(Template("slide_start.png"), Template("slide_end.png"))
#添加断言的图片
assert_exists(Template("success.png"))
#点击Android上的返回键
#keyevent("BACK")
#点击Android上的Home键返回
#home()
#uninstall("package_name_of_your_apk")

  

相关文章:

  • 2021-11-22
  • 2022-12-23
  • 2021-07-02
  • 2021-06-08
  • 2022-12-23
  • 2022-01-17
  • 2021-10-10
  • 2021-04-07
猜你喜欢
  • 2022-12-23
  • 2021-04-16
  • 2022-01-18
  • 2021-07-12
  • 2022-12-23
  • 2022-12-23
  • 2021-08-18
相关资源
相似解决方案