(mobileStep *MobileStep)
| 361 | } |
| 362 | |
| 363 | func convertCompatMobileStep(mobileStep *MobileStep) { |
| 364 | if mobileStep == nil { |
| 365 | return |
| 366 | } |
| 367 | for i := 0; i < len(mobileStep.Actions); i++ { |
| 368 | ma := mobileStep.Actions[i] |
| 369 | actionOptions := uixt.NewActionOptions(ma.GetOptions()...) |
| 370 | // append tap_cv params to screenshot_with_ui_types option |
| 371 | if ma.Method == uixt.ACTION_TapByCV { |
| 372 | uiTypes, _ := builtin.ConvertToStringSlice(ma.Params) |
| 373 | ma.ActionOptions.ScreenShotWithUITypes = append(ma.ActionOptions.ScreenShotWithUITypes, uiTypes...) |
| 374 | } |
| 375 | // set default max_retry_times to 10 for swipe_to_tap_texts |
| 376 | if ma.Method == uixt.ACTION_SwipeToTapTexts && actionOptions.MaxRetryTimes == 0 { |
| 377 | ma.ActionOptions.MaxRetryTimes = 10 |
| 378 | } |
| 379 | // set default max_retry_times to 10 for swipe_to_tap_text |
| 380 | if ma.Method == uixt.ACTION_SwipeToTapText && actionOptions.MaxRetryTimes == 0 { |
| 381 | ma.ActionOptions.MaxRetryTimes = 10 |
| 382 | } |
| 383 | mobileStep.Actions[i] = ma |
| 384 | } |
| 385 | } |
| 386 | |
| 387 | // convertJmespathExpr deals with limited jmespath expression conversion |
| 388 | func convertJmespathExpr(checkExpr string) string { |
no test coverage detected