【问题标题】:How can I make a purchase by means of calabash-android through Google Play?如何通过 Google Play 使用 calabash-android 进行购买?
【发布时间】:2017-02-06 13:29:21
【问题描述】:

我对 ruby​​ 进行了测试 - 使用 calabash-android,我想在我的应用中购买 vip - 通过 Google Play 框架。 在 irb 控制台中没有显示这个谷歌框架。我不想点击坐标。

calabash-android console apk

start_test_server_in_background

query("*") = Google Play 框架未显示

monitor - 它命令我可以在应用程序中查看 id 元素并出现 Google Play fraym

也许有人知道怎么做?

【问题讨论】:

    标签: android automation automated-tests calabash calabash-android


    【解决方案1】:

    使用 calabash-android 我们无法自动化其他应用程序。由于它检测了您的应用程序,因此 calabash 命令仅适用于您的应用程序,而不适用于其他应用程序。

    在这种情况下,您可以使用 python android UI Automator 或 adb 命令在代码中编写 python 包装器

    你实现两种方式

    1. Python uiautomator - https://github.com/xiaocong/uiautomator
    2. Adb 命令 - https://developer.android.com/studio/command-line/shell.html

    【讨论】:

    • 是的,在您的测试运行相同屏幕尺寸的设备之前,您的坐标问题是正确的。如果您想运行不同尺寸的屏幕设备,您可以使用第一个选项,或者您只想触摸可以使用以下 adb 命令的坐标:system 'adb shell input tap x y'
    • 这是个好主意,它适用于一个设备,如果我使用其他设备,那么坐标可以是其他的
    • 是的,你是对的。如果它对你有用,那么其他人也可以使用这个
    猜你喜欢
    • 1970-01-01
    • 2014-03-25
    • 1970-01-01
    • 2013-03-31
    • 2017-10-03
    • 1970-01-01
    • 2017-01-22
    • 2015-02-26
    • 1970-01-01
    相关资源
    最近更新 更多