fix: 修复拉起appium setting后 不能立即获取pid

This commit is contained in:
余泓铮
2024-07-02 21:22:15 +08:00
parent 7f8ab3f3c1
commit 55d111256a

View File

@@ -768,6 +768,7 @@ func (ad *adbDriver) SetIme(imeRegx string) error {
}
if strings.ToLower(brand) == "oppo" {
time.Sleep(1 * time.Second)
pid, _ := ad.adbClient.RunShellCommand("pidof", packageName)
if strings.TrimSpace(pid) == "" {
focusedPackage, err := ad.GetFocusedPackage()