IOS airtest 基本操作
- poco
from poco.drivers.ios import iosPoco
poco = iosPoco(dev) - airtest 连接
from airtest.core.api import *
test_device_id = “iOS:///127.0.0.1:8100”
dev = connect_device(test_device_id) - airtest事件
keyevent(“HOME”) # 把app置于后台
stop_app(“com.tcl.tclhome”) # 把app置于后台
start_app(“com.tcl.tclhome”) # 把app置于前台,如果未启动则启动
poco().swipe([0.7, -0.5]) #刷新
keyevent(“ENTER”) #回车
poco("").set_text(“hello”) # 默认加ENTER
text(“hello”,search=True) # search – 是否要按下输入法键盘中的search键,默认为False;部分输入框,需要在输入内容后,点击输入键盘中的search键才能够激活搜索操作,