close popups before swipeToTapApp

This commit is contained in:
buyuxiang
2023-10-24 17:32:58 +08:00
parent 41f705c0d9
commit 79c91637db
3 changed files with 7 additions and 2 deletions
+5
View File
@@ -178,6 +178,11 @@ func (dExt *DriverExt) swipeToTapApp(appName string, options ...ActionOption) er
return errors.Wrap(err, "go to home screen failed")
}
// automatic handling popups before swipe
if err := dExt.ClosePopups(); err != nil {
log.Error().Err(err).Msg("auto handle popup failed")
}
// swipe to first screen
for i := 0; i < 5; i++ {
dExt.SwipeRight()