【发布时间】:2023-03-20 07:05:01
【问题描述】:
自动创建的 rob 脚本不会在我知道我的应用程序在执行脚本化设置操作时需要的地方插入延迟。我如何使用我认为可能的这两个选项中的任何一个,或者是否有批准的方法?我找不到任何脚本命令指南,所以我瞎了。
获取现有“DELAYED_MESSAGE_POSTED”的副本并将其移动到我想要增加延迟的位置。
编辑我想要在之前/之后额外延迟的事件的“delayTime”。
我已经尝试过 #1 和 #2,但似乎在我编辑后脚本不会运行,所以要么这些不是解决这个问题的方法,要么我搞砸了。任何指导将不胜感激。
这是脚本中的一个 sn-p,它具有两种方法。我在此脚本中的 cmets(仅用于此发布,而不是在我运行的脚本中)以“
[
...
{
"eventType": "DELAYED_MESSAGE_POSTED",
"timestamp": 1570820588045,
"actionCode": -1,
"delayTime": 7000,
"canScrollTo": false,
"elementDescriptors": []
},
{
"eventType": "VIEW_CLICKED",
"timestamp": 1570820599551,
"replacementText": "",
"actionCode": -1,
"delayTime": 0,
"canScrollTo": false,
"elementDescriptors": [
{
"className": "androidx.appcompat.widget.AppCompatImageButton",
"recyclerViewChildPosition": -1,
"adapterViewChildPosition": -1,
"groupViewChildPosition": 2,
"resourceId": "com.jingleware.sosalert:id/ForwardArrow6",
"contentDescription": "",
"text": ""
},
{
"className": "android.widget.RelativeLayout",
"recyclerViewChildPosition": -1,
"adapterViewChildPosition": -1,
"groupViewChildPosition": 0,
"resourceId": "com.jingleware.sosalert:id/thanks",
"contentDescription": "",
"text": ""
},
{
"className": "android.widget.RelativeLayout",
"recyclerViewChildPosition": -1,
"adapterViewChildPosition": -1,
"groupViewChildPosition": 0,
"resourceId": "com.jingleware.sosalert:id/pager",
"contentDescription": "",
"text": ""
}
]
},
{ <<<<- added delay using the first method>
"eventType": "DELAYED_MESSAGE_POSTED",
"timestamp": 1570820605000, <<<<- Here's where I stuck in a value, not knowing what the effect would be
"actionCode": -1,
"delayTime": 1000,
"canScrollTo": false,
"elementDescriptors": []
},
{
"eventType": "VIEW_CLICKED",
"timestamp": 1570820606462,
"replacementText": "",
"actionCode": -1,
"delayTime": 0, <<<<- I tried to set this to 1000, without the discrete delay that's shown above
"canScrollTo": true,
"elementDescriptors": [
{
"className": "androidx.appcompat.widget.AppCompatButton",
"recyclerViewChildPosition": -1,
"adapterViewChildPosition": -1,
"groupViewChildPosition": 1,
"resourceId": "com.jingleware.sosalert:id/NameField",
"contentDescription": "",
"text": ""
},
{
"className": "android.widget.RelativeLayout",
"recyclerViewChildPosition": -1,
"adapterViewChildPosition": -1,
"groupViewChildPosition": 0,
"resourceId": "com.jingleware.sosalert:id/userinfoinfo",
"contentDescription": "",
"text": ""
},
{
"className": "android.widget.ScrollView",
"recyclerViewChildPosition": -1,
"adapterViewChildPosition": -1,
"groupViewChildPosition": 0,
"resourceId": "com.jingleware.sosalert:id/userinfoscroller",
"contentDescription": "",
"text": ""
},
{
"className": "android.widget.RelativeLayout",
"recyclerViewChildPosition": -1,
"adapterViewChildPosition": -1,
"groupViewChildPosition": 1,
"resourceId": "com.jingleware.sosalert:id/userinfo",
"contentDescription": "",
"text": ""
}
]
},
...
]
【问题讨论】:
标签: android firebase android-testing firebase-test-lab