mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-11 18:11:21 +08:00
fix: screenshot error code
This commit is contained in:
@@ -537,7 +537,7 @@ func (ad *adbDriver) Screenshot() (raw *bytes.Buffer, err error) {
|
||||
if err == 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) {
|
||||
|
||||
@@ -62,7 +62,7 @@ func (dExt *DriverExt) GetScreenResult(options ...ActionOption) (screenResult *S
|
||||
|
||||
windowSize, err = dExt.Driver.WindowSize()
|
||||
if err != nil {
|
||||
lastErr = errors.Wrap(code.MobileUIDriverError, err.Error())
|
||||
lastErr = errors.Wrap(code.DeviceGetInfoError, err.Error())
|
||||
continue
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user