fix: sleep specified seconds

This commit is contained in:
debugtalk
2022-09-18 10:42:31 +08:00
parent abbd3fb205
commit 84f9d2d532
2 changed files with 11 additions and 4 deletions

View File

@@ -17,6 +17,7 @@ import (
"github.com/electricbubble/gwda"
cvHelper "github.com/electricbubble/opencv-helper"
"github.com/pkg/errors"
"github.com/rs/zerolog/log"
)
// TemplateMatchMode is the type of the template matching operation.
@@ -170,6 +171,7 @@ func (dExt *DriverExt) takeScreenShot() (raw *bytes.Buffer, err error) {
return dExt.frame, nil
}
if raw, err = dExt.WebDriver.Screenshot(); err != nil {
log.Error().Err(err).Msgf("screenshot failed: %v", err)
return nil, err
}
return