refactor: handle text popups

This commit is contained in:
lilong.129
2023-08-22 14:17:43 +08:00
parent 75158b4e58
commit cc3aedb810
3 changed files with 35 additions and 18 deletions
+3 -7
View File
@@ -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