本地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
相关产品推荐
相关产品推荐

