faet: add ScreenCap for gadb

This commit is contained in:
lilong.129
2023-04-13 22:48:40 +08:00
parent 3d4dffbd0b
commit ef784709af
3 changed files with 6 additions and 4 deletions
+1 -3
View File
@@ -280,9 +280,7 @@ func (ad *adbDriver) SetRotation(rotation Rotation) (err error) {
func (ad *adbDriver) Screenshot() (raw *bytes.Buffer, err error) {
// adb shell screencap -p
resp, err := ad.adbClient.RunShellCommandWithBytes(
"screencap", "-p",
)
resp, err := ad.adbClient.ScreenCap()
if err == nil {
return bytes.NewBuffer(resp), nil
}