1. 打印定位的文本

1 #先定位到该元素(精确定位、模糊定位都可以)
2 textName=poco(textMatches="^我的任务.*$") 
3 
4 #使用get_text() 拿到想要的定位的文本
5 realName = textName.get_text()

 

2.启动app

如图,获取该app包名

自动化--APP UI自动化--Airtest 实用命令汇总

 

 

1 start_app('w2xxxxxxxxxro')

 

3.关闭app

2中获取app包名

1 stop_app('w2xxxxxxxxxxxro')

 

4.输入框输入值

1 poco(name="xxxx").set_text("111")

 

相关文章:

  • 2021-06-08
  • 2021-12-03
  • 2021-06-12
  • 2022-12-23
  • 2021-10-13
  • 2022-12-23
  • 2021-07-27
  • 2022-12-23
猜你喜欢
  • 2021-12-10
  • 2021-10-11
  • 2021-06-01
  • 2021-11-14
  • 2021-10-29
  • 2021-12-27
  • 2022-12-23
相关资源
相似解决方案