bytedance / Fastbot_Android

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

测试指定页面 无法实现(白名单和手动配置Activity都不行) #209

Closed gradient30 closed 10 months ago

gradient30 commented 1 year ago

main 如图,需求实现测试:首页里的(新游 、 排行)这两个页面, 1.单独使用白名单无法实现awl.strings 首页:com.xqhy.legendbox.main.BoxMainActivity 新游:com.xqhy.legendbox.main.home.view.NewGameRecommendActivity 排行:com.xqhy.legendbox.main.home.view.HomeChildActivity 2.加上自定义事件序列,跳到“新游”页面执行 并返回到 首页后,无法切到“排行”,语法没问题(在https://www.json.cn/确认过) 方法1是 把首页和排行的页面点击写在下边的actions里不行,因为排行和新游 会跳转新的activity;单独写2个activity也不行

[
{
    "prop":1,
    "activity":"com.xqhy.legendbox.main.BoxMainActivity",
    "times":1,
    "actions":[
        {
            "xpath":"//*[@resource-id='com.xqhy.legendbox:id/home_text']",
            "action":"CLICK",
            "text":"首页",
            "clearText":false,
            "throttle":1000
        }   
    ]
}
]

会在mainactivity里循环, image

gradient30 commented 1 year ago

这样进入页面:新游 ,但返回首页后,进不了:排行,,,也是在主页的各个面签之间循环【首页、社区、在玩、任务、我的、

[
{
    "prop":1,
    "activity":"com.xqhy.legendbox.main.BoxMainActivity",
    "times":1,
    "actions":[
        {
            "xpath":"//*[@resource-id='com.xqhy.legendbox:id/home_text']",
            "action":"CLICK",
            "text":"首页",
            "clearText":false,
            "throttle":1000
        },
        {
            "xpath":"//*[@resource-id='com.xqhy.legendbox:id/home_tab']/android.view.ViewGroup[1]/android.view.ViewGroup[1]/android.widget.ImageView[1]",
            "action":"CLICK",
            "clearText":false,
            "throttle":1000
        },
        {
            "xpath":"//*[@resource-id='com.xqhy.legendbox:id/home_tab']/android.view.ViewGroup[5]/android.view.ViewGroup[1]/android.widget.ImageView[1]",
            "action":"CLICK",
            "clearText":false,
            "throttle":1000
        }
    ]
}
]
gradient30 commented 1 year ago
[
{
    "prop":1,
    "activity":"com.xqhy.legendbox.main.BoxMainActivity",
    "times":1,
    "actions":[
        {
            "xpath":"//*[@resource-id='com.xqhy.legendbox:id/home_text']",
            "action":"CLICK",
            "text":"首页",
            "clearText":false,
            "throttle":1000
        },
        {
            "xpath":"//*[@resource-id='com.xqhy.legendbox:id/home_tab']/android.view.ViewGroup[1]/android.view.ViewGroup[1]/android.widget.ImageView[1]",
            "action":"CLICK",
            "clearText":false,
            "throttle":1000
        }
    ]
}
,
{
    "prop":1,
    "activity":"com.xqhy.legendbox.main.BoxMainActivity",
    "times":1,
    "actions":[
        {
            "xpath":"//*[@resource-id='com.xqhy.legendbox:id/home_text']",
            "action":"CLICK",
            "text":"首页",
            "clearText":false,
            "throttle":1000
        },
        {
            "xpath":"//*[@resource-id='com.xqhy.legendbox:id/home_tab']/android.view.ViewGroup[5]/android.view.ViewGroup[1]/android.widget.ImageView[1]",
            "action":"CLICK",
            "clearText":false,
            "throttle":1000
        }
    ]
}
]
astrid77 commented 1 year ago

我也是。。

zhangzhao4444 commented 10 months ago

2.3.23.0810.1705-git fixed

zhousijia commented 3 months ago

2.3.23.0810.1705-git已修复

请问最新的代码包含了这个修复吗,我也遇到了这个问题