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

max.xpath.actions定义的执行序列未能正常运行 #200

Closed yanjinging closed 10 months ago

yanjinging commented 1 year ago

[ { "prob": 1, "activity": "com.bjgoodwill.mobilemrb.ui.flash.FlashActivity", "actions": [ { "xpath": "//[@resource-id='com.bjgoodwill.beizhongmrb:id/btn_skip']", "index": 0, "action": "CLICK", "throttle": 3000 } ] }, { "prob": 1, "activity": "com.bjgoodwill.mobilemrb.ui.login.LoginActivity", "actions": [ { "xpath": "//[@resource-id='com.bjgoodwill.beizhongmrb:id/md_buttonDefaultNegative' and @text='以后再说']", "index": 2, "action": "CLICK", "throttle": 1000 }, { "xpath": "//[@resource-id='com.bjgoodwill.beizhongmrb:id/et_phone']", "action": "INPUTTEXT", "text": "13333333333", "index": 0, "throttle": 2000 }, { "xpath": "//[@resource-id='com.bjgoodwill.beizhongmrb:id/et_pswd']", "action": "INPUTTEXT", "text": "123456", "index": 0, "throttle": 2000 }, { "xpath": "//*[@resource-id='com.bjgoodwill.beizhongmrb:id/btn_login']", "action": "CLICK", "index": 3, "throttle": 2000 } ] } ]

yanjinging commented 1 year ago

[Fastbot][2022-11-01 17:31:39.619] // current activity is com.bjgoodwill.mobilemrb.ui.flash.FlashActivity [Fastbot][2022-11-01 17:31:39.620] Sleeping for 2000 milliseconds [Fastbot][2022-11-01 17:31:42.835] // topcomp is null or newtree is null, accessibility maybe error, need do fuzz. [Fastbot][2022-11-01 17:31:42.868] fastbot native : library load! [Fastbot][2022-11-01 17:31:42.918] event time:1296 [Fastbot][2022-11-01 17:31:42.918] :Sending rotation degree=0, persist=false [Fastbot][2022-11-01 17:31:42.942] :Sending Touch (ACTION_DOWN): 0:(938.0,88.0) [Fastbot][2022-11-01 17:31:42.966] Wait Event for 885 milliseconds [Fastbot][2022-11-01 17:31:43.858] :Sending Touch (ACTION_UP): 0:(938.0,88.0) [Fastbot][2022-11-01 17:31:43.874] :Sending Touch (ACTION_DOWN): 0:(452.0,892.0) [Fastbot][2022-11-01 17:31:43.892] Wait Event for 783 milliseconds [Fastbot][2022-11-01 17:31:44.679] :Sending Touch (ACTION_UP): 0:(452.0,892.0) [Fastbot][2022-11-01 17:31:44.741] Shell command settings put global always_finish_activities 0 status was 0 [Fastbot][2022-11-01 17:31:44.748] :Sending Touch (ACTION_DOWN): 0:(198.0,1009.0) [Fastbot][2022-11-01 17:31:44.752] Wait Event for 355 milliseconds [Fastbot][2022-11-01 17:31:45.112] :Sending Touch (ACTION_UP): 0:(198.0,1009.0) [Fastbot][2022-11-01 17:31:45.128] :Sending Touch (ACTION_DOWN): 0:(321.0,1039.0) [Fastbot][2022-11-01 17:31:45.132] :Sending Touch (ACTION_UP): 0:(303.31113,1045.5026) [Fastbot][2022-11-01 17:31:45.148] // Eventid: 22 [Fastbot][2022-11-01 17:31:45.172] action type: CLICK [Fastbot][2022-11-01 17:31:45.173] rpc cost time: 19 [Fastbot][2022-11-01 17:31:45.179] event time:38 [Fastbot][2022-11-01 17:31:45.180] :Sending rotation degree=0, persist=false [Fastbot][2022-11-01 17:31:45.216] :Sending Touch (ACTION_DOWN): 0:(900.0,238.0) [Fastbot][2022-11-01 17:31:45.222] :Sending Touch (ACTION_UP): 0:(900.0,238.0) [Fastbot][2022-11-01 17:31:45.226] Sleeping for 4000 milliseconds [Fastbot][2022-11-01 17:31:45.260] // the top activity is com.bjgoodwill.mobilemrb.ui.login.LoginActivity, phone capture activity is com.android.camera.CameraActivity [Fastbot][2022-11-01 17:31:45.261] // Allowing start of Intent { cmp=com.bjgoodwill.beizhongmrb/com.bjgoodwill.mobilemrb.ui.login.LoginActivity } in package com.bjgoodwill.beizhongmrb [Fastbot][2022-11-01 17:31:45.290] // activityResuming(com.bjgoodwill.beizhongmrb) [Fastbot][2022-11-01 17:31:49.239] // current activity is com.bjgoodwill.mobilemrb.ui.login.LoginActivity [Fastbot][2022-11-01 17:31:49.266] // Eventid: 26 [Fastbot][2022-11-01 17:31:49.275] action type: CLICK [Fastbot][2022-11-01 17:31:49.276] rpc cost time: 4 [Fastbot][2022-11-01 17:31:49.287] event time:34 [Fastbot][2022-11-01 17:31:49.289] :Sending rotation degree=0, persist=false [Fastbot][2022-11-01 17:31:49.370] :Sending Touch (ACTION_DOWN): 0:(555.0,1300.0) [Fastbot][2022-11-01 17:31:49.376] :Sending Touch (ACTION_UP): 0:(555.0,1300.0) [Fastbot][2022-11-01 17:31:49.401] Sleeping for 2000 milliseconds [Fastbot][2022-11-01 17:31:51.631] // topcomp is null or newtree is null, accessibility maybe error, need do fuzz. [Fastbot][2022-11-01 17:31:51.642] event time:235 [Fastbot][2022-11-01 17:31:51.644] :Sending rotation degree=0, persist=false [Fastbot][2022-11-01 17:31:51.676] :Sending Key (ACTION_DOWN): 82 // KEYCODE_MENU [Fastbot][2022-11-01 17:31:51.696] :Sending Key (ACTION_UP): 82 // KEYCODE_MENU [Fastbot][2022-11-01 17:31:51.732] :Sending Key (ACTION_DOWN): 20 // KEYCODE_DPAD_DOWN [Fastbot][2022-11-01 17:31:51.743] :Sending Key (ACTION_UP): 20 // KEYCODE_DPAD_DOWN [Fastbot][2022-11-01 17:31:51.756] :Sending Touch (ACTION_DOWN): 0:(1046.0,94.0) [Fastbot][2022-11-01 17:31:51.762] :Sending Touch (ACTION_MOVE): 0:(1045.6406,94.032036) [Fastbot][2022-11-01 17:31:51.767] Wait Event for 20 milliseconds [Fastbot][2022-11-01 17:31:51.791] :Sending Touch (ACTION_MOVE): 0:(1039.51,94.24926) [Fastbot][2022-11-01 17:31:51.795] Wait Event for 20 milliseconds [Fastbot][2022-11-01 17:31:51.820] :Sending Touch (ACTION_MOVE): 0:(1039.1896,94.68327) [Fastbot][2022-11-01 17:31:51.824] Wait Event for 20 milliseconds [Fastbot][2022-11-01 17:31:51.851] :Sending Touch (ACTION_MOVE): 0:(1032.7356,94.9478) [Fastbot][2022-11-01 17:31:51.857] Wait Event for 20 milliseconds [Fastbot][2022-11-01 17:31:51.882] :Sending Touch (ACTION_MOVE): 0:(1027.8082,95.018234) [Fastbot][2022-11-01 17:31:51.891] Wait Event for 20 milliseconds [Fastbot][2022-11-01 17:31:51.920] :Sending Touch (ACTION_MOVE): 0:(1026.1467,95.11943) [Fastbot][2022-11-01 17:31:51.925] Wait Event for 20 milliseconds [Fastbot][2022-11-01 17:31:51.950] :Sending Touch (ACTION_MOVE): 0:(1024.3497,95.44272) [Fastbot][2022-11-01 17:31:51.956] Wait Event for 20 milliseconds [Fastbot][2022-11-01 17:31:51.984] :Sending Touch (ACTION_MOVE): 0:(1019.96124,95.89199) [Fastbot][2022-11-01 17:31:51.995] Wait Event for 20 milliseconds [Fastbot][2022-11-01 17:31:52.026] :Sending Touch (ACTION_UP): 0:(1014.50494,96.295235) [Fastbot][2022-11-01 17:31:52.049] :Sending Touch (ACTION_DOWN): 0:(872.0,937.0) [Fastbot][2022-11-01 17:31:52.058] :Sending Touch (ACTION_MOVE): 0:(880.46375,935.18585) [Fastbot][2022-11-01 17:31:52.067] Wait Event for 66 milliseconds [Fastbot][2022-11-01 17:31:52.140] :Sending Touch (ACTION_UP): 0:(885.6672,930.8269) [Fastbot][2022-11-01 17:31:52.155] :Sending Touch (ACTION_DOWN): 0:(295.0,694.0) [Fastbot][2022-11-01 17:31:52.163] :Sending Touch (ACTION_MOVE): 0:(293.6608,690.2329) [Fastbot][2022-11-01 17:31:52.169] Wait Event for 28 milliseconds [Fastbot][2022-11-01 17:31:52.203] :Sending Touch (ACTION_MOVE): 0:(289.8719,689.63696) [Fastbot][2022-11-01 17:31:52.212] Wait Event for 28 milliseconds [Fastbot][2022-11-01 17:31:52.248] :Sending Touch (ACTION_MOVE): 0:(284.00076,688.005) [Fastbot][2022-11-01 17:31:52.256] Wait Event for 28 milliseconds [Fastbot][2022-11-01 17:31:52.292] :Sending Touch (ACTION_MOVE): 0:(283.40158,673.7339) [Fastbot][2022-11-01 17:31:52.303] Wait Event for 28 milliseconds [Fastbot][2022-11-01 17:31:52.338] :Sending Touch (ACTION_MOVE): 0:(274.484,667.8478) [Fastbot][2022-11-01 17:31:52.346] Wait Event for 28 milliseconds [Fastbot][2022-11-01 17:31:52.381] :Sending Touch (ACTION_UP): 0:(267.43353,662.5373) [Fastbot][2022-11-01 17:31:52.412] :Sending Key (ACTION_DOWN): 91 // KEYCODE_MUTE [Fastbot][2022-11-01 17:31:52.435] :Sending Key (ACTION_UP): 91 // KEYCODE_MUTE [Fastbot][2022-11-01 17:31:52.487] :Sending Key (ACTION_DOWN): 187 // KEYCODE_APP_SWITCH [Fastbot][2022-11-01 17:31:52.496] :Sending Key (ACTION_UP): 187 // KEYCODE_APP_SWITCH [Fastbot][2022-11-01 17:31:52.534] Sleeping for 500 milliseconds [Fastbot][2022-11-01 17:31:52.572] // the top activity is com.vivo.upslide.recents.RecentsActivity, phone capture activity is com.android.camera.CameraActivity [Fastbot][2022-11-01 17:31:52.572] // Rejecting start of Intent { cmp=com.vivo.upslide/.recents.RecentsActivity } in package com.vivo.upslide [Fastbot][2022-11-01 17:31:53.042] :Sending Key (ACTION_DOWN): 3 // KEYCODE_HOME [Fastbot][2022-11-01 17:31:53.062] :Sending Key (ACTION_UP): 3 // KEYCODE_HOME [Fastbot][2022-11-01 17:31:53.103] // activityResuming(com.bbk.launcher2) [Fastbot][2022-11-01 17:31:53.104] // Rejecting resume of package com.bbk.launcher2 [Fastbot][2022-11-01 17:31:53.143] :Sending rotation degree=1, persist=true [Fastbot][2022-11-01 17:31:53.190] // Eventid: 89 [Fastbot][2022-11-01 17:31:53.195] action type: NOP

yanjinging commented 1 year ago

max.xpath.actions文件已经推到/sdcard路径下了,元素的路径,所属activity反复检查了好多遍;安装了ADB keyboard并设置成了默认,但是执行命令的时候,就是不执行自定义的特殊序列,命令如下 adb shell CLASSPATH=/sdcard/monkeyq.jar:/sdcard/framework.jar:/sdcard/fastbot-thirdpart.jar exec app_process /system/bin com.android.commands.monkey.Monkey -p com.bjgoodwill.beizhongmrb --running-minutes 1 --throttle 1000 --agent robot -v -v --output-directory /sdcard/max-output 反复纠结了好多天,实在是想不明白

gradient30 commented 1 year ago

max.xpath.actions文件已经推到/sdcard路径下了,元素的路径,所属activity反复检查了好多遍;安装了ADB keyboard并设置成了默认,但是执行命令的时候,就是不执行自定义的特殊序列,命令如下 adb shell CLASSPATH=/sdcard/monkeyq.jar:/sdcard/framework.jar:/sdcard/fastbot-thirdpart.jar exec app_process /system/bin com.android.commands.monkey.Monkey -p com.bjgoodwill.beizhongmrb --running-minutes 1 --throttle 1000 --agent robot -v -v --output-directory /sdcard/max-output 反复纠结了好多天,实在是想不明白

我试了下只会执行一次,后边就开始随机页面了。没啥实际价值

zhangzhao4444 commented 10 months ago

2.3.23.0810.1705-git fixed