fix: screenshot error code

This commit is contained in:
lilong.129
2024-09-19 11:46:20 +08:00
parent ead8475f2f
commit 88fd0181c3
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -537,7 +537,7 @@ func (ad *adbDriver) Screenshot() (raw *bytes.Buffer, err error) {
if err == nil { if err == nil {
return bytes.NewBuffer(resp), nil return bytes.NewBuffer(resp), nil
} }
return nil, err return nil, errors.Wrap(err, "adb screencap failed")
} }
func (ad *adbDriver) Source(srcOpt ...SourceOption) (source string, err error) { func (ad *adbDriver) Source(srcOpt ...SourceOption) (source string, err error) {
+1 -1
View File
@@ -62,7 +62,7 @@ func (dExt *DriverExt) GetScreenResult(options ...ActionOption) (screenResult *S
windowSize, err = dExt.Driver.WindowSize() windowSize, err = dExt.Driver.WindowSize()
if err != nil { if err != nil {
lastErr = errors.Wrap(code.MobileUIDriverError, err.Error()) lastErr = errors.Wrap(code.DeviceGetInfoError, err.Error())
continue continue
} }