Skip to content

Commit

Permalink
active IgnoreNotFoundError option for tap_cv
Browse files Browse the repository at this point in the history
  • Loading branch information
bbxwinner committed Jun 15, 2023
1 parent d4ee3a8 commit cd730a1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion hrp/internal/version/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v4.3.3.2306081644
v4.3.3.2306151200
6 changes: 3 additions & 3 deletions hrp/pkg/uixt/ext.go
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -614,15 +614,15 @@ 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
for _, uiParam := range uiParams {
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:
Expand Down

0 comments on commit cd730a1

Please sign in to comment.