merge branch merge-from-video

This commit is contained in:
lilong.129
2024-08-21 14:57:53 +08:00
45 changed files with 2280 additions and 365 deletions

View File

@@ -346,6 +346,15 @@ func (s *StepMobile) VideoCrawler(params map[string]interface{}) *StepMobile {
return &StepMobile{step: s.step}
}
func (s *StepMobile) EndToEndDelay(options ...uixt.ActionOption) *StepMobile {
s.obj().Actions = append(s.obj().Actions, uixt.MobileAction{
Method: uixt.ACTION_EndToEndDelay,
Params: nil,
Options: uixt.NewActionOptions(options...),
})
return &StepMobile{step: s.step}
}
func (s *StepMobile) ScreenShot(options ...uixt.ActionOption) *StepMobile {
s.obj().Actions = append(s.obj().Actions, uixt.MobileAction{
Method: uixt.ACTION_ScreenShot,
@@ -600,8 +609,22 @@ func runStepMobileUI(s *SessionRunner, step *TStep) (stepResult *StepResult, err
"osType": osType,
})
identifer := mobileStep.Identifier
if mobileStep.Options != nil && identifer == "" {
identifer = mobileStep.Options.Identifier
}
if len(mobileStep.Actions) != 0 && identifer == "" {
for _, action := range mobileStep.Actions {
if action.Identifier != "" {
identifer = action.Identifier
break
}
}
}
stepResult = &StepResult{
Name: step.Name,
Identifier: identifer,
StepType: StepType(osType),
Success: false,
ContentSize: 0,