mirror of
https://github.com/httprunner/httprunner.git
synced 2026-07-12 16:01:27 +08:00
merge branch merge-from-video
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user