mirror of
https://github.com/httprunner/httprunner.git
synced 2026-08-27 11:10:31 +08:00
merge master
This commit is contained in:
@@ -605,18 +605,18 @@ func runStepMobileUI(s *SessionRunner, step *TStep) (stepResult *StepResult, err
|
||||
}
|
||||
|
||||
// report GA event
|
||||
sdk.SendGA4Event("hrp_run_ui", map[string]interface{}{
|
||||
go sdk.SendGA4Event("hrp_run_ui", map[string]interface{}{
|
||||
"osType": osType,
|
||||
})
|
||||
|
||||
identifer := mobileStep.Identifier
|
||||
if mobileStep.Options != nil && identifer == "" {
|
||||
identifer = mobileStep.Options.Identifier
|
||||
identifier := mobileStep.Identifier
|
||||
if mobileStep.Options != nil && identifier == "" {
|
||||
identifier = mobileStep.Options.Identifier
|
||||
}
|
||||
if len(mobileStep.Actions) != 0 && identifer == "" {
|
||||
if len(mobileStep.Actions) != 0 && identifier == "" {
|
||||
for _, action := range mobileStep.Actions {
|
||||
if action.Identifier != "" {
|
||||
identifer = action.Identifier
|
||||
identifier = action.Identifier
|
||||
break
|
||||
}
|
||||
}
|
||||
@@ -624,7 +624,7 @@ func runStepMobileUI(s *SessionRunner, step *TStep) (stepResult *StepResult, err
|
||||
|
||||
stepResult = &StepResult{
|
||||
Name: step.Name,
|
||||
Identifier: identifer,
|
||||
Identifier: identifier,
|
||||
StepType: StepType(osType),
|
||||
Success: false,
|
||||
ContentSize: 0,
|
||||
@@ -650,8 +650,10 @@ func runStepMobileUI(s *SessionRunner, step *TStep) (stepResult *StepResult, err
|
||||
}
|
||||
|
||||
// automatic handling of pop-up windows on each step finished
|
||||
if err2 := uiDriver.ClosePopupsHandler(); err2 != nil {
|
||||
log.Error().Err(err2).Str("step", step.Name).Msg("handle popup failed on step finished")
|
||||
if !step.IgnorePopup && !s.IgnorePopup() {
|
||||
if err2 := uiDriver.ClosePopups(); err2 != nil {
|
||||
log.Error().Err(err2).Str("step", step.Name).Msg("auto handle popup failed")
|
||||
}
|
||||
}
|
||||
|
||||
// save attachments
|
||||
|
||||
Reference in New Issue
Block a user