feat: check android uiautomator server package installed

This commit is contained in:
lilong.129
2024-10-11 20:57:09 +08:00
parent 7506ebcb3b
commit 37cbfacc2d
6 changed files with 45 additions and 13 deletions

View File

@@ -675,7 +675,7 @@ func (d *Device) ListPackages() ([]string, error) {
return packages, nil
}
func (d *Device) IsPackagesInstalled(packageName string) bool {
func (d *Device) IsPackageInstalled(packageName string) bool {
packages, err := d.ListPackages()
if err != nil {
return false

View File

@@ -349,7 +349,7 @@ func TestDevice_ListPackages(t *testing.T) {
t.Fatal(err)
}
t.Log(res)
installed := dev.IsPackagesInstalled("io.appium.uiautomator2.server")
installed := dev.IsPackageInstalled("io.appium.uiautomator2.server")
if err != nil {
t.Fatal(err)
}