diff --git a/internal/version/VERSION b/internal/version/VERSION index 88754c49..47e2af34 100644 --- a/internal/version/VERSION +++ b/internal/version/VERSION @@ -1 +1 @@ -v5.0.0-beta-2503061750 +v5.0.0-beta-2503061758 diff --git a/uixt/android_driver_adb.go b/uixt/android_driver_adb.go index 51668140..ae4634ce 100644 --- a/uixt/android_driver_adb.go +++ b/uixt/android_driver_adb.go @@ -792,6 +792,9 @@ func (ad *ADBDriver) ScreenRecord(opts ...option.ActionOption) (videoPath string } duration := options.ScreenRecordDuration + if duration == 0 { + duration = options.Duration + } audioOn := options.ScreenRecordWithAudio // get android system version diff --git a/uixt/android_test.go b/uixt/android_test.go index df78b307..8c098b71 100644 --- a/uixt/android_test.go +++ b/uixt/android_test.go @@ -195,7 +195,8 @@ func TestDriver_ADB_ForegroundInfo(t *testing.T) { func TestDriver_ADB_ScreenRecord(t *testing.T) { driver := setupADBDriverExt(t) - path1, err := driver.ScreenRecord(option.WithScreenRecordDuation(182)) + path1, err := driver.ScreenRecord( + option.WithScreenRecordDuation(5)) assert.Nil(t, err) defer os.Remove(path1) t.Log(path1)