uiautomator2 icon indicating copy to clipboard operation
uiautomator2 copied to clipboard

如何进行定位截图【How to take a positioning screenshot】

Open keannen opened this issue 3 years ago • 1 comments

看完请删掉该内容

提Bug需要注意的事项

请务必提供详细的信息,能够复现你的问题,否则很难帮你解决。没用的Issue将自动被机器人打上Invalid标签并且自动关闭!!。

  • 手机型号
  • uiautomator2的版本号(pip show uiautomator2)
  • 手机截图
  • 相关日志(Python控制台错误信息, adb logcat完整信息, atxagent.log日志)
  • 最好能附上可能复现问题的代码。

keannen avatar Sep 17 '21 06:09 keannen

可以区域截图 import uiautomator2 as u2 driver = u2.connect(serial) x=0 y=0 width = 100 height = 100 uiObjectBox = [x, y, x + width, y +height] driver.screenshot().crop(uiObjectBox).save('test.jpg')

wangxin-trec avatar Feb 11 '23 10:02 wangxin-trec