You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

本地Robo测试使用App Crawler失效,但Firebase Test Lab可正常运行

本地运行Robo脚本未按预期终止爬取的问题

我使用以下命令运行Robo脚本:

java -jar crawl_launcher.jar --robo-script-file <path> --apk-file <path> --android-sdk <path>  --app-package-name <package-name>

执行该命令后,应用启动后会尝试所有可能的操作,但我的Robo脚本中已经添加了ALL_ELEMENTS_IGNORED和TERMINATE_CRAWL操作,仅要求在这两个操作之前执行指定的点击与输入动作。

该脚本在Firebase Test Lab中可完美运行,以下是脚本内容:

[
{
    "roboscript": {
        "executionMode": {
          "strict": true
        },
        "postscript": {
          "terminate": true
        }
    },
    "actions": [
    {
         "eventType": "VIEW_CLICKED",
         "elementDescriptors": [
           {
             "resourceId": "com.awantunai.app.alpha:id/buttonOnBoardingLogin"
           }
         ]
    },
    {
        "eventType": "VIEW_TEXT_CHANGED",
        "replacementText": "08929292929",
        "elementDescriptors": [
          {
            "resourceId": "com.awantunai.app.alpha:id/inputPhoneNumber"
          }
        ]
    },
    {
        "eventType": "VIEW_TEXT_CHANGED",
        "replacementText": "Nayan1993",
        "elementDescriptors": [
          {
            "resourceId": "com.awantunai.app.alpha:id/inputPassword"
          }
        ]
    },
    {
        "eventType": "VIEW_CLICKED",
        "elementDescriptors": [
          {
            "resourceId": "com.awantunai.app.alpha:id/buttonNext"
          }
        ]
    },
    {
      "eventType": "DELAYED_MESSAGE_POSTED",
      "delayTime": 4000
    },
    {
        "eventType": "VIEW_CLICKED",
        "elementDescriptors": [
          {
            "resourceId": "com.awantunai.app.alpha:id/bt_order_again"
          }
        ]
    },
    {
      "eventType": "VIEW_CLICKED",
      "elementDescriptors": [
        {
          "resourceId": "com.awantunai.app.alpha:id/transaction_btn"
        }
      ]
  },
    {
        "eventType": "ALL_ELEMENTS_IGNORED"
    },
    {
        "eventType": "TERMINATE_CRAWL"
    }
  ]
}
]

内容的提问来源于stack exchange,提问作者nayan dhabarde

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.27 13:37:46