introduce expert test for both integration and regression

This commit is contained in:
buyuxiang
2023-08-25 12:48:28 +08:00
parent 244bf039e6
commit 30da13891e
4 changed files with 1288 additions and 2 deletions
+14 -2
View File
@@ -102,7 +102,7 @@ func (s *StepMobile) Tap(params string, options ...uixt.ActionOption) *StepMobil
return &StepMobile{step: s.step}
}
// Tap taps on the target element by OCR recognition
// TapByOCR taps on the target element by OCR recognition
func (s *StepMobile) TapByOCR(ocrText string, options ...uixt.ActionOption) *StepMobile {
action := uixt.MobileAction{
Method: uixt.ACTION_TapByOCR,
@@ -114,7 +114,7 @@ func (s *StepMobile) TapByOCR(ocrText string, options ...uixt.ActionOption) *Ste
return &StepMobile{step: s.step}
}
// Tap taps on the target element by CV recognition
// TapByCV taps on the target element by CV recognition
func (s *StepMobile) TapByCV(imagePath string, options ...uixt.ActionOption) *StepMobile {
action := uixt.MobileAction{
Method: uixt.ACTION_TapByCV,
@@ -126,6 +126,18 @@ func (s *StepMobile) TapByCV(imagePath string, options ...uixt.ActionOption) *St
return &StepMobile{step: s.step}
}
// TapByUITypes taps on the target element specified by uiTypes, the higher the uiTypes, the higher the priority
func (s *StepMobile) TapByUITypes(uiTypes []string, options ...uixt.ActionOption) *StepMobile {
action := uixt.MobileAction{
Method: uixt.ACTION_TapByCV,
Params: uiTypes,
Options: uixt.NewActionOptions(options...),
}
s.mobileStep().Actions = append(s.mobileStep().Actions, action)
return &StepMobile{step: s.step}
}
// DoubleTapXY double taps the point {X,Y}, X & Y is percentage of coordinates
func (s *StepMobile) DoubleTapXY(x, y float64, options ...uixt.ActionOption) *StepMobile {
s.mobileStep().Actions = append(s.mobileStep().Actions, uixt.MobileAction{