fix: compress screenshot image file

This commit is contained in:
lilong.129
2024-09-14 13:36:18 +08:00
parent 87f9c6808e
commit a2e5a35be2
2 changed files with 31 additions and 8 deletions
+23
View File
@@ -0,0 +1,23 @@
//go:build localtest
package uixt
import (
"testing"
)
func TestGetScreenShot(t *testing.T) {
setupAndroidAdbDriver(t)
fileName := "test_screenshot"
_, path, err := driverExt.GetScreenShot(fileName)
if err != nil {
t.Fatalf("GetScreenShot failed: %v", err)
}
if path == "" {
t.Fatal("screenshot path is empty")
}
t.Logf("screenshot saved at: %s", path)
}