fix: screenshot with path

This commit is contained in:
lilong.129
2025-03-05 10:43:26 +08:00
parent 7539e456d7
commit 9e064ee0ad
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -1 +1 @@
v5.0.0+2503042040 v5.0.0+2503051043
+1 -1
View File
@@ -254,11 +254,11 @@ func (ud *UIA2Driver) Orientation() (orientation types.Orientation, err error) {
func (ud *UIA2Driver) DoubleTap(x, y float64, opts ...option.ActionOption) error { func (ud *UIA2Driver) DoubleTap(x, y float64, opts ...option.ActionOption) error {
var err error var err error
actionOptions := option.NewActionOptions(opts...)
x, y, err = convertToAbsolutePoint(ud, x, y) x, y, err = convertToAbsolutePoint(ud, x, y)
if err != nil { if err != nil {
return err return err
} }
actionOptions := option.NewActionOptions(opts...)
x, y = actionOptions.ApplyOffset(x, y) x, y = actionOptions.ApplyOffset(x, y)
data := map[string]interface{}{ data := map[string]interface{}{
+1 -1
View File
@@ -69,7 +69,7 @@ func (dExt *XTDriver) GetScreenResult(opts ...option.ActionOption) (screenResult
// get screenshot info with retry // get screenshot info with retry
for i := 0; i < 3; i++ { for i := 0; i < 3; i++ {
imagePath = filepath.Join(config.GetConfig().ScreenShotsPath, fileName) imagePath = filepath.Join(config.GetConfig().ScreenShotsPath, fileName)
bufSource, err = dExt.ScreenShot() bufSource, err = dExt.ScreenShot(option.WithScreenShotFileName(imagePath))
if err != nil { if err != nil {
lastErr = err lastErr = err
continue continue