mirror of
https://github.com/httprunner/httprunner.git
synced 2026-08-28 19:47:14 +08:00
refactor: handle text popups
This commit is contained in:
@@ -603,13 +603,9 @@ func runStepMobileUI(s *SessionRunner, step *TStep) (stepResult *StepResult, err
|
||||
}
|
||||
}
|
||||
|
||||
// take screenshot and get screen texts by OCR
|
||||
screenTexts, err2 := uiDriver.GetScreenTexts()
|
||||
if err2 != nil {
|
||||
log.Error().Err(err2).Str("step", step.Name).Msg("take screenshot failed on step finished")
|
||||
} else if err3 := uiDriver.AutoPopupHandler(screenTexts); err3 != nil {
|
||||
// automatic handling of pop-up windows on each step finished
|
||||
log.Error().Err(err3).Msg("auto handle popup failed")
|
||||
// automatic handling of pop-up windows on each step finished
|
||||
if err = uiDriver.AutoPopupHandler(); err != nil {
|
||||
log.Error().Err(err).Str("step", step.Name).Msg("auto handle popup failed")
|
||||
}
|
||||
|
||||
// save attachments
|
||||
|
||||
Reference in New Issue
Block a user