mirror of
https://github.com/httprunner/httprunner.git
synced 2026-08-28 19:47:14 +08:00
feat: add GetForegroundApp for android
This commit is contained in:
@@ -28,8 +28,7 @@ func (dExt *DriverExt) VideoCrawler(configs *VideoCrawlerConfigs) (err error) {
|
||||
// loop until target count achieved
|
||||
for {
|
||||
// check if app in foreground
|
||||
err := dExt.Driver.AssertAppForeground(configs.AppPackageName)
|
||||
if err != nil {
|
||||
if err := dExt.Driver.AssertAppForeground(configs.AppPackageName); err != nil {
|
||||
log.Error().Err(err).Str("packageName", configs.AppPackageName).Msg("app is not in foreground")
|
||||
err = errors.Wrap(code.MobileUIAppNotInForegroundError, err.Error())
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user