change: upgrade gwda to 0.4.0

This commit is contained in:
debugtalk 2022-08-15 21:57:03 +08:00
parent 0407c02391
commit df3b56c18c
3 changed files with 4 additions and 4 deletions

2
go.mod
View File

@ -5,7 +5,7 @@ go 1.16
require (
github.com/andybalholm/brotli v1.0.4
github.com/denisbrodbeck/machineid v1.0.1
github.com/electricbubble/gwda v0.3.1-0.20220731124432-07f451783588
github.com/electricbubble/gwda v0.4.0
github.com/fatih/color v1.13.0
github.com/getsentry/sentry-go v0.13.0
github.com/go-errors/errors v1.0.1

4
go.sum
View File

@ -101,8 +101,8 @@ github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25Kn
github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM=
github.com/electricbubble/gidevice v0.6.2 h1:eIeCHH7Xn5fTwnUv3qL8c7L4anKIHtjlTBkgr1LDVTc=
github.com/electricbubble/gidevice v0.6.2/go.mod h1:bRHL2M9qgeEKju8KRvKMZUVEg7t5zMnTiG3SJ3QDH5o=
github.com/electricbubble/gwda v0.3.1-0.20220731124432-07f451783588 h1:CAq1AvRKkG8/PX6LCLwYpERq/TIXkVNTXq4MJEWGlG0=
github.com/electricbubble/gwda v0.3.1-0.20220731124432-07f451783588/go.mod h1:kyzKpP1/iKJ2i4AxmT8sEmSvB8Pz5NcDVwc/m/Jsg6k=
github.com/electricbubble/gwda v0.4.0 h1:+Sbi8WRM8sXh0cXpmY97GiWuR1CNQ/v2tsMUyWxlnV4=
github.com/electricbubble/gwda v0.4.0/go.mod h1:kyzKpP1/iKJ2i4AxmT8sEmSvB8Pz5NcDVwc/m/Jsg6k=
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=

View File

@ -501,7 +501,7 @@ func (w *wdaClient) screenShot() error {
if err := builtin.EnsureFolderExists(screenshotsDir); err != nil {
return errors.Wrap(err, "create screenshots failed")
}
path := filepath.Join(screenshotsDir, fmt.Sprintf("%d", time.Now().UnixMilli())+"."+format)
path := filepath.Join(screenshotsDir, fmt.Sprintf("%d", time.Now().Unix())+"."+format)
file, err := os.Create(path)
if err != nil {
return errors.Wrap(err, "create screenshot image file failed")