我使用appium自动化原生应用程序 . Appium在版本低于7.0的所有设备上运行良好,但是当我在7.0或更高版本上运行appium时,appium启动应用程序但不会执行进一步操作(appium不会停止执行,它会在启动应用程序后冻结) .
请参考下面的appium日志 .
disc='loginScreen_createAccountSelectorButton']","4e69a744-5030-426e-a666-539ec0dc6ef7"]
[debug] [BaseDriver] Valid locator strategies for this request: xpath, id, class name, accessibility id, -android uiautomator
[debug] [BaseDriver] Valid locator strategies for this request: xpath, id, class name, accessibility id, -android uiautomator
[debug] [BaseDriver] Waiting up to 0 ms for condition
[debug] [AndroidBootstrap] Sending command to android: {"cmd":"action","action":"find","params":{"strategy":"xpath","selector":"//android.widget.TextViewp[@conent-disc='loginScreen_createAccountSelectorButton']","context":"","multiple":false}}
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got data from client: {"cmd":"action","action":"find","params":{"strategy":"xpath","selector":"//android.widget.TextViewp[@conent-disc='loginScreen_createAccountSelectorButton']","context":"","multiple":false}}
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command of type ACTION
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command action: find
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Finding '//android.widget.TextViewp[@conent-disc='loginScreen_createAccountSelectorButton']' using 'XPATH' with the contextId: '' multiple: false
如果您看到日志的最后一行,appium trie要找到该元素但appium服务器不会停止,它将永远运行 . 请帮助它在版本超过7.0的Android设备上运行 .
1 回答
为了解决您的问题,您需要更新Android 7.0 SDK . 您可以通过在Android Studio中导航到 Help => Check for Updates 来实现 .
您还可以通过导航到SDK Manager安装所需版本的SDK,然后从列表中选择SDK并进行安装 .
Note:
我可以毫不费力地在我的Android 7.0设备上执行测试,因为我可以让我的Appium和Android保持最新状态 .