add log for FindUI

This commit is contained in:
buyuxiang
2023-06-08 21:35:19 +08:00
parent 6b5582a07d
commit d4ee3a855b
3 changed files with 5 additions and 6 deletions

View File

@@ -1 +1 @@
v4.3.3.2306081354 v4.3.3.2306081644

View File

@@ -141,6 +141,7 @@ func (s *veDEMUIService) FindUI(uiTypes []string, byteSource []byte, options ...
log.Error().Err(err).Msg("getUIResult failed") log.Error().Err(err).Msg("getUIResult failed")
return return
} }
log.Info().Interface("ui detection result", uiResultMap).Msg("ui detection successful")
var uiResult []Box var uiResult []Box
var ok bool var ok bool

View File

@@ -656,11 +656,9 @@ func runStepMobileUI(s *SessionRunner, step *TStep) (stepResult *StepResult, err
// wait for screenshot actions done // wait for screenshot actions done
uiDriver.Wg.Wait() uiDriver.Wg.Wait()
// save screenshot after each step, except the step ends with sleep // save screenshot after each step
if len(actions) > 0 && actions[len(actions)-1].Method != uixt.CtlSleep { if err := uiDriver.SaveScreenShot(builtin.GenNameWithTimestampMS("step_%d_") + step.Name); err != nil {
if err := uiDriver.SaveScreenShot(builtin.GenNameWithTimestampMS("step_%d_") + step.Name); err != nil { log.Error().Err(err).Str("step", step.Name).Msg("take screenshot failed on step finished")
log.Error().Err(err).Str("step", step.Name).Msg("take screenshot failed on step finished")
}
} }
// save attachments // save attachments