test: add unittest for adb PushImage/ClearImages

This commit is contained in:
lilong.129
2025-03-07 11:38:50 +08:00
parent af2e2f30cf
commit 683bbdd7f6
3 changed files with 18 additions and 1 deletions

View File

@@ -925,6 +925,7 @@ func (ad *ADBDriver) PushImage(localPath string) error {
if err := ad.Device.PushFile(localPath, remotePath); err != nil {
return err
}
// refresh
_, _ = ad.Device.RunShellCommand("am", "broadcast",
"-a", "android.intent.action.MEDIA_SCANNER_SCAN_FILE",
"-d", fmt.Sprintf("file://%s", remotePath))