#断言存在

assert_exists(Template(r"tpl1611284952927.png", record_pos=(0.062, -0.287), resolution=(720, 1280)), "请填写测试点")

#断言包含
value = poco("com.createwit.kaidan:id/synthesize_tv").attr("text")
try:
  assert_equal(value, "综合", "按钮值为:综合")
except AssertionError:
  print("按钮值断言失败")


#判断是否存在某个按钮,具有则点击,不具有则执行其他操作
if exists(Template(r"tpl1611283287349.png", record_pos=(0.004, -0.157), resolution=(720, 1280))) :
  touch exists(Template(r"tpl1611283287349.png", record_pos=(0.004, -0.157), resolution=(720, 1280)))
else:
  print("没有这个选项")

相关文章:

  • 2021-12-31
  • 2021-05-29
  • 2022-03-08
  • 2021-12-19
  • 2022-12-23
  • 2022-12-23
  • 2022-01-13
猜你喜欢
  • 2022-02-17
  • 2021-09-26
  • 2022-02-02
  • 2021-12-27
  • 2021-08-02
  • 2021-10-22
  • 2022-12-23
相关资源
相似解决方案