在Android 7.0 appium启动应用程序,但不会执行进一步的操作

时间:2017-11-10 08:40:22

标签: android selenium selenium-webdriver automation appium

我使用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 个答案:

答案 0 :(得分:0)

要解决您的问题,您需要更新Android 7.0 SDK。您可以在Android Studio中导航到帮助=>检查更新

您还可以通过导航到SDK Manager安装所需版本的SDK,然后从列表中选择SDK并进行安装。

注意:

我可以毫不费力地在Android 7.0设备上执行测试,因为我保持Appium和Android的最新状态。