zhangzhao4444 / Maxim

高速uiautomator控件解析算法的Android Monkey, 每秒10-15个Action Event。实现快速DFS算法的Android Monkey , 每秒 5个Action Event。
866 stars 280 forks source link

max.xpath.actions配置如下,发现只执行了第一个,后面一个就不执行了,请问是为啥? #53

Open pxrgod opened 3 years ago

pxrgod commented 3 years ago

[ { "prob": 1, "actions": [ { "xpath": "//[@class='android.view.View' and @content-desc='注册登录']", "action": "CLICK", "index": 0, "throttle": 3000 } ] }, { "prob": 1, "activity": "com..widget.FragmentWrapperActivity", "actions": [ { "xpath": "//[@class='android.widget.EditText' and @text='请输入登录密码']", "action": "INPUTTEXT", "text": "123456", "index": 0, "throttle": 1000 }, { "xpath": "//[@class='android.view.View' and @content-desc='登录']", "index": 0, "action": "CLICK", "throttle": 10000 } ] } ] Monkey日志如下: [Maxim] start build tree 2021-06-30 21:17:12.289 [Maxim] // Special Event : XPath = //[@class='android.view.View' and @content-desc='注册登录'], Index = 0, Action = CLICK, Text = [Maxim] // Find it : 0|1|8|0|1, null, android.view.View, 注册登录, null, null, false, Rect(807, 271 - 979, 321) [Maxim] over build tree 2021-06-30 21:17:12.732

这里可以确定的是注册登录进去之后,肯定能找到"xpath": "//*[@class='android.widget.EditText' and @text='请输入登录密码']"

pxrgod commented 3 years ago

Fastboot_Android我使用相同的max.xpath.actions,我发现是可以执行的

zhaoxu-zhang commented 2 years ago

我也遇到了相同的问题, 请问有解决吗?

yanjinging commented 1 year ago

也是一模一样的问题,只能执行一个activity内的操作,一但跳转activtiy,定义的序列就无法执行,疯了,不知道为啥

Swayingleaves commented 1 year ago

相同的问题,拿淘宝APP测试,只执行第一个touch事件,后面一个不会执行


[
    {
        "prob":1,
        "activity":"com.taobao.tao.TBMainActivity",
        "actions":[
            {
                "xpath":"//*[@class='android.widget.FrameLayout' and @content-desc='我的淘宝']",
                "index":0,
                "action":"TOUCH",
                "args":"972,2140",
                "throttle":2000
            },
           {
                "xpath":"//*[@class='android.widget.FrameLayout' and @content-desc='购物车']",
                "index":0,
               "action":"TOUCH",
               "args":"751,2127",
                "throttle":2000
            }
        ]
    }
]