mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-05 15:37:35 +08:00
faet: add ScreenCap for gadb
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user