airtest 获取分辨率 绝对坐标 相对坐标

airtest 获取当前屏幕分辨率
width = G.DEVICE.display_info['width']
height = G.DEVICE.display_info['height']
print(width,height)
已知相对坐标 [0.12,0.709],转换成绝对坐标
x1 = 0.12*width
y1 = 0.709*height
touch([x1,y1])

已知绝对坐标[88.1060],转换成相对坐标
x2 = 88/width
y2 = 1060/height
poco.click([x2,y2])

猜你喜欢

转载自blog.csdn.net/weixin_42540340/article/details/108120316