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
+1 -1
View File
@@ -1 +1 @@
v4.3.3.2306081354
v4.3.3.2306081644
+1
View File
@@ -141,6 +141,7 @@ func (s *veDEMUIService) FindUI(uiTypes []string, byteSource []byte, options ...
log.Error().Err(err).Msg("getUIResult failed")
return
}
log.Info().Interface("ui detection result", uiResultMap).Msg("ui detection successful")
var uiResult []Box
var ok bool
+1 -3
View File
@@ -656,12 +656,10 @@ func runStepMobileUI(s *SessionRunner, step *TStep) (stepResult *StepResult, err
// wait for screenshot actions done
uiDriver.Wg.Wait()
// save screenshot after each step, except the step ends with sleep
if len(actions) > 0 && actions[len(actions)-1].Method != uixt.CtlSleep {
// save screenshot after each step
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")
}
}
// save attachments
attachments["screenshots"] = uiDriver.GetScreenShots()