bytedance / Fastbot_Android

Fastbot(2.0) is a model-based testing tool for modeling GUI transitions to discover app stability problems
Other
1.06k stars 245 forks source link

自定义事件序列max.xpath.actions希望能支持adb类型的action #136

Closed chenweiwei closed 2 years ago

chenweiwei commented 2 years ago

你好,我们希望在自定义事件序列中,支持adb类型的action。比如这次开发新开发了一个页面,层级很深,直接用monkey覆盖不到, 但支持 类似adb shell am start -n com.wudaokou.nrf/com.tmall.ighw.mock.sdk.MockActivity 直接跳转到某个activity

zhangzhao4444 commented 2 years ago

{ "prob": 1, "activity":"com.xx.xx.xx.xx.xx.xxx", "times": 1, "actions": [ { "xpath": "//*[@resource-id='com.xx.xx.xx.xx.xx.xxx:id/ar' and @text='手机号']", ... }, { "action": "SHELL_EVENT", "command": "input keyevent 3", "wait": 10000, "throttle": 1000 },

以上为例 执行一条shell命令 或者 schema { "xpath": "//*[@resource-id='com.ss.android.article.local:id/a0z']", "action": "SCHEMA_EVENT", "uri": "snssdk143://1", "wait": 10000, "throttle": 1000 },

chenweiwei commented 2 years ago

请问执行schma_event,还需要输入xpath吗