mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-05 23:51:25 +08:00
fix tap_cv params type assertion
This commit is contained in:
@@ -1 +1 @@
|
|||||||
v4.3.3.2305301203
|
v4.3.3.2306081354
|
||||||
+6
-1
@@ -616,7 +616,12 @@ func (dExt *DriverExt) DoAction(action MobileAction) error {
|
|||||||
if imagePath, ok := action.Params.(string); ok {
|
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(true), WithDataIndex(action.Index))
|
||||||
}
|
}
|
||||||
if uiTypes, ok := action.Params.([]string); ok {
|
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(true), WithDataIndex(action.Index))
|
||||||
}
|
}
|
||||||
return fmt.Errorf("invalid %s params: %v", ACTION_TapByCV, action.Params)
|
return fmt.Errorf("invalid %s params: %v", ACTION_TapByCV, action.Params)
|
||||||
|
|||||||
Reference in New Issue
Block a user