mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-05 15:37:35 +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 {
|
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) {
|
||||||
|
|||||||
@@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user