Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
pxrgod opened this issue Jun 30, 2021 · 4 comments

Comments

@pxrgod
Copy link

pxrgod commented Jun 30, 2021

[
{
"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
Copy link
Author

pxrgod commented Jul 2, 2021

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

@zhaoxu-zhang
Copy link

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

@yanjinging
Copy link

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

@Swayingleaves
Copy link

Swayingleaves commented Jun 23, 2023

相同的问题,拿淘宝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
            }
        ]
    }
]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants