mirror of
https://github.com/httprunner/httprunner.git
synced 2026-06-11 02:39:46 +08:00
feat: tap the first one matches text from given texts by ocr
This commit is contained in:
@@ -244,6 +244,18 @@ func (s *StepIOS) SwipeToTapText(text string, options ...uixt.ActionOption) *Ste
|
||||
return &StepIOS{step: s.step}
|
||||
}
|
||||
|
||||
func (s *StepIOS) SwipeToTapFromTexts(texts []string, options ...uixt.ActionOption) *StepIOS {
|
||||
action := uixt.MobileAction{
|
||||
Method: uixt.ACTION_SwipeToTapText,
|
||||
Params: texts,
|
||||
}
|
||||
for _, option := range options {
|
||||
option(&action)
|
||||
}
|
||||
s.step.IOS.Actions = append(s.step.IOS.Actions, action)
|
||||
return &StepIOS{step: s.step}
|
||||
}
|
||||
|
||||
func (s *StepIOS) Input(text string, options ...uixt.ActionOption) *StepIOS {
|
||||
action := uixt.MobileAction{
|
||||
Method: uixt.ACTION_Input,
|
||||
|
||||
Reference in New Issue
Block a user