change: add back action of mobile ui automation

This commit is contained in:
xucong.053
2022-11-09 16:36:36 +08:00
parent df2e255d8f
commit 093a4f5206
5 changed files with 47 additions and 5 deletions

View File

@@ -181,6 +181,18 @@ func (s *StepMobile) DoubleTap(params string, options ...uixt.ActionOption) *Ste
return &StepMobile{step: s.step}
}
func (s *StepMobile) Back(options ...uixt.ActionOption) *StepMobile {
action := uixt.MobileAction{
Method: uixt.ACTION_Back,
Params: nil,
}
for _, option := range options {
option(&action)
}
s.mobileStep().Actions = append(s.mobileStep().Actions, action)
return &StepMobile{step: s.step}
}
func (s *StepMobile) Swipe(sx, sy, ex, ey float64, options ...uixt.ActionOption) *StepMobile {
action := uixt.MobileAction{
Method: uixt.ACTION_Swipe,