mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-21 08:10:24 +08:00
feat: tap the first one matches text from given texts by ocr
This commit is contained in:
@@ -324,6 +324,18 @@ func (s *StepAndroid) SwipeToTapText(text string, options ...uixt.ActionOption)
|
||||
return &StepAndroid{step: s.step}
|
||||
}
|
||||
|
||||
func (s *StepAndroid) SwipeToTapFromTexts(texts []string, options ...uixt.ActionOption) *StepAndroid {
|
||||
action := uixt.MobileAction{
|
||||
Method: uixt.ACTION_SwipeToTapText,
|
||||
Params: texts,
|
||||
}
|
||||
for _, option := range options {
|
||||
option(&action)
|
||||
}
|
||||
s.step.Android.Actions = append(s.step.Android.Actions, action)
|
||||
return &StepAndroid{step: s.step}
|
||||
}
|
||||
|
||||
// Validate switches to step validation.
|
||||
func (s *StepAndroid) Validate() *StepAndroidValidation {
|
||||
return &StepAndroidValidation{
|
||||
|
||||
Reference in New Issue
Block a user