airtest get resolution absolute coordinates relative coordinates

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])

Guess you like

Origin blog.csdn.net/weixin_42540340/article/details/108120316