change: tap & swipe

This commit is contained in:
debugtalk
2022-08-28 00:41:45 +08:00
parent 3222b21156
commit d3c1c08030
4 changed files with 61 additions and 103 deletions

View File

@@ -66,25 +66,17 @@ func (s *StepAndroid) StopRecording() *StepAndroid {
return &StepAndroid{step: s.step}
}
func (s *StepAndroid) Click(params interface{}) *StepAndroid {
func (s *StepAndroid) Tap(params interface{}) *StepAndroid {
s.step.Android.Actions = append(s.step.Android.Actions, MobileAction{
Method: uiClick,
Method: uiTap,
Params: params,
})
return &StepAndroid{step: s.step}
}
func (s *StepAndroid) DoubleClick(params interface{}) *StepAndroid {
func (s *StepAndroid) DoubleTap(params interface{}) *StepAndroid {
s.step.Android.Actions = append(s.step.Android.Actions, MobileAction{
Method: uiDoubleClick,
Params: params,
})
return &StepAndroid{step: s.step}
}
func (s *StepAndroid) LongClick(params interface{}) *StepAndroid {
s.step.Android.Actions = append(s.step.Android.Actions, MobileAction{
Method: uiLongClick,
Method: uiDoubleTap,
Params: params,
})
return &StepAndroid{step: s.step}