From cd730a1cb9e54426f45f17fc859fde4beaffe074 Mon Sep 17 00:00:00 2001 From: buyuxiang <347586493@qq.com> Date: Thu, 15 Jun 2023 11:56:43 +0800 Subject: [PATCH] active IgnoreNotFoundError option for tap_cv --- hrp/internal/version/VERSION | 2 +- hrp/pkg/uixt/ext.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hrp/internal/version/VERSION b/hrp/internal/version/VERSION index 2594b9af..c63f5e80 100644 --- a/hrp/internal/version/VERSION +++ b/hrp/internal/version/VERSION @@ -1 +1 @@ -v4.3.3.2306081644 \ No newline at end of file +v4.3.3.2306151200 \ No newline at end of file diff --git a/hrp/pkg/uixt/ext.go b/hrp/pkg/uixt/ext.go index 440fb242..ec0f1ca0 100644 --- a/hrp/pkg/uixt/ext.go +++ b/hrp/pkg/uixt/ext.go @@ -592,7 +592,7 @@ func (dExt *DriverExt) DoAction(action MobileAction) error { return fmt.Errorf("invalid %s params: %v", ACTION_TapAbsXY, action.Params) case ACTION_Tap: if param, ok := action.Params.(string); ok { - return dExt.Tap(param, WithDataIdentifier(action.Identifier), WithDataIgnoreNotFoundError(true), WithDataIndex(action.Index)) + return dExt.Tap(param, WithDataIdentifier(action.Identifier), WithDataIgnoreNotFoundError(action.IgnoreNotFoundError), WithDataIndex(action.Index)) } return fmt.Errorf("invalid %s params: %v", ACTION_Tap, action.Params) case ACTION_TapByOCR: @@ -614,7 +614,7 @@ func (dExt *DriverExt) DoAction(action MobileAction) error { return fmt.Errorf("invalid %s params: %v", ACTION_TapByOCR, action.Params) case ACTION_TapByCV: if imagePath, ok := action.Params.(string); ok { - return dExt.TapByCV(imagePath, WithDataIdentifier(action.Identifier), WithDataIgnoreNotFoundError(true), WithDataIndex(action.Index)) + return dExt.TapByCV(imagePath, WithDataIdentifier(action.Identifier), WithDataIgnoreNotFoundError(action.IgnoreNotFoundError), WithDataIndex(action.Index)) } if uiParams, ok := action.Params.([]interface{}); ok { var uiTypes []string @@ -622,7 +622,7 @@ func (dExt *DriverExt) DoAction(action MobileAction) error { uiType, _ := uiParam.(string) uiTypes = append(uiTypes, uiType) } - return dExt.TapByUIDetection(uiTypes, WithDataIdentifier(action.Identifier), WithDataIgnoreNotFoundError(true), WithDataIndex(action.Index)) + return dExt.TapByUIDetection(uiTypes, WithDataIdentifier(action.Identifier), WithDataIgnoreNotFoundError(action.IgnoreNotFoundError), WithDataIndex(action.Index)) } return fmt.Errorf("invalid %s params: %v", ACTION_TapByCV, action.Params) case ACTION_DoubleTapXY: