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配置没有跑到 #286

Open
fengzhongdeyan62912 opened this issue Jun 25, 2024 · 7 comments
Open

max.xpath.actions配置没有跑到 #286

fengzhongdeyan62912 opened this issue Jun 25, 2024 · 7 comments

Comments

@fengzhongdeyan62912
Copy link

fengzhongdeyan62912 commented Jun 25, 2024

按照中文手册所说设置了max.xpath.actions的内容,移到了/sdcard中,但是跑测的时候没有跑到对应的按键,日志里也没有显示~

@ReynoldNeverSaySorry
Copy link

你先确认下是不是json格式

@lilylei665
Copy link

你先确认下是不是json格式

我遇到了一样的问题,不生效,日志里也没记录。用json工具看了,格式都是对的。不知道怎么回事

@ReynoldNeverSaySorry
Copy link

@lilylei665 可以贴下内容看看

@lilylei665
Copy link

lilylei665 commented Sep 14, 2024

@lilylei665 可以贴下内容看看

[Fastbot][2024-09-14 14:52:24.435] @Version: 2.3.23.0810.1705-git
[Fastbot][2024-09-14 14:52:24.459] // Monkey: seed=1726472919806 count=1000

[Fastbot][2024-09-14 14:52:24.459] // AllowPackage: com.p.client
[Fastbot][2024-09-14 14:52:24.460] // IncludeCategory: android.intent.category.LAUNCHER
[Fastbot][2024-09-14 14:52:24.460] // IncludeCategory: android.intent.category.MONKEY
[Fastbot]*** ERROR *** findMethod() error, NoSuchMethodException happened, there is no such method: setActivityController
[Fastbot][2024-09-14 14:52:24.604] // Selecting main activities from category android.intent.category.LAUNCHER
[Fastbot][2024-09-14 14:52:24.605] // - NOT USING main activity com.samsung.android.gallery.app.activity.GalleryActivity (from package com.sec.android.gallery3d)
[Fastbot][2024-09-14 14:52:24.605] // - NOT USING main activity com.google.android.apps.chrome.Main (from package com.android.chrome)
[Fastbot][2024-09-14 14:52:24.606] // - NOT USING main activity com.android.settings.Settings (from package com.android.settings)
[Fastbot][2024-09-14 14:52:24.606] // - NOT USING main activity com.android.vending.AssetBrowserActivity (from package com.android.vending)
[Fastbot][2024-09-14 14:52:24.606] // - NOT USING main activity com.google.android.maps.MapsActivity (from package com.google.android.apps.maps)
[Fastbot][2024-09-14 14:52:24.607] // - NOT USING main activity com.google.android.apps.messaging.ui.ConversationListActivity (from package com.google.android.apps.messaging)
[Fastbot][2024-09-14 14:52:24.607] // - NOT USING main activity com.google.android.apps.tachyon.MainActivity (from package com.google.android.apps.tachyon)
[Fastbot][2024-09-14 14:52:24.607] // - NOT USING main activity com.google.android.gm.ConversationListActivityGmail (from package com.google.android.gm)
[Fastbot][2024-09-14 14:52:24.608] // - NOT USING main activity com.google.android.youtube.app.honeycomb.Shell$HomeActivity (from package com.google.android.youtube)
[Fastbot][2024-09-14 14:52:24.608] // - NOT USING main activity com.samsung.android.contacts.contactslist.PeopleActivity (from package com.samsung.android.app.contacts)
[Fastbot][2024-09-14 14:52:24.608] // - NOT USING main activity com.samsung.android.arzone.ARZoneLauncher (from package com.samsung.android.arzone)
[Fastbot][2024-09-14 14:52:24.609] // - NOT USING main activity com.samsung.android.app.calendar.activity.MainActivity (from package com.samsung.android.calendar)
[Fastbot][2024-09-14 14:52:24.609] // - NOT USING main activity com.samsung.android.dialer.DialtactsActivity (from package com.samsung.android.dialer)
[Fastbot][2024-09-14 14:52:24.609] // - NOT USING main activity com.android.mms.ui.ConversationComposer (from package com.samsung.android.messaging)
[Fastbot][2024-09-14 14:52:24.610] // - NOT USING main activity com.sec.android.app.camera.Camera (from package com.sec.android.app.camera)
[Fastbot][2024-09-14 14:52:24.610] // - NOT USING main activity com.google.android.apps.docs.app.NewMainProxyActivity (from package com.google.android.apps.docs)
[Fastbot][2024-09-14 14:52:24.610] // - NOT USING main activity com.google.android.apps.photos.home.HomeActivity (from package com.google.android.apps.photos)
[Fastbot][2024-09-14 14:52:24.610] // - NOT USING main activity com.google.android.videos.GoogleTvEntryPoint (from package com.google.android.videos)
[Fastbot][2024-09-14 14:52:24.611] // - NOT USING main activity com.opera.max.ui.v2.MainActivity (from package com.opera.max.oem)
[Fastbot][2024-09-14 14:52:24.611] // - NOT USING main activity com.samsung.android.app.tips.TipsMainActivity (from package com.samsung.android.app.tips)
[Fastbot][2024-09-14 14:52:24.611] // - NOT USING main activity host.exp.exponent.experience.HomeActivity (from package host.exp.exponent)
[Fastbot][2024-09-14 14:52:24.611] // - NOT USING main activity mark.via.Shell (from package mark.via)
[Fastbot][2024-09-14 14:52:24.612] // - NOT USING main activity com.google.android.googlequicksearchbox.SearchActivity (from package com.google.android.googlequicksearchbox)
[Fastbot][2024-09-14 14:52:24.612] // - NOT USING main activity com.microsoft.skydrive.MainActivity (from package com.microsoft.skydrive)
[Fastbot][2024-09-14 14:52:24.612] // - NOT USING main activity com.samsung.android.app.spage.main.LauncherActivity (from package com.samsung.android.app.spage)
[Fastbot][2024-09-14 14:52:24.613] // - NOT USING main activity com.sec.android.app.clockpackage.ClockPackage (from package com.sec.android.app.clockpackage)
[Fastbot][2024-09-14 14:52:24.614] // - NOT USING main activity com.sec.android.app.myfiles.ui.MainActivity (from package com.sec.android.app.myfiles)
[Fastbot][2024-09-14 14:52:24.616] // - NOT USING main activity com.sec.android.app.samsungapps.SamsungAppsMainActivity (from package com.sec.android.app.samsungapps)
[Fastbot][2024-09-14 14:52:24.617] // - NOT USING main activity com.sec.android.easyMover.ui.launch.LauncherActivity (from package com.sec.android.easyMover)
[Fastbot][2024-09-14 14:52:24.618] // - NOT USING main activity com.eaas.launcher.activities.main.MainActivity (from package com.binance.dev)
[Fastbot][2024-09-14 14:52:24.618] // - NOT USING main activity com.facebook.katana.LoginActivity (from package com.facebook.katana)
[Fastbot][2024-09-14 14:52:24.619] // - NOT USING main activity com.google.android.apps.authenticator2.main.MainActivity (from package com.google.android.apps.authenticator2)
[Fastbot][2024-09-14 14:52:24.620] // - NOT USING main activity sg.mha.app.ui.SplashActivity (from package com.ministryofhomeaffairs.sgsecure.mhasg)
[Fastbot][2024-09-14 14:52:24.621] // - NOT USING main activity com.netease.mail.biz.main.DefaultSplashActivity (from package com.netease.mobimail)
[Fastbot][2024-09-14 14:52:24.621] // + Using main activity com.p.MainActivity (from package com.p.client)
[Fastbot][2024-09-14 14:52:24.621] // - NOT USING main activity com.rybit.app.MainActivity (from package com.rybit.app)
[Fastbot][2024-09-14 14:52:24.622] // - NOT USING main activity com.tencent.gcloud.msdk.core.policy.MSDKPolicyActivity (from package com.tencent.mf.uam)
[Fastbot][2024-09-14 14:52:24.622] // - NOT USING main activity com.tencent.mobileqq.activity.SplashActivity (from package com.tencent.mobileqq)
[Fastbot][2024-09-14 14:52:24.623] // - NOT USING main activity com.tencent.mtt.SplashActivity (from package com.tencent.mtt)
[Fastbot][2024-09-14 14:52:24.623] // - NOT USING main activity com.tencent.tmgp.sgame.SGameActivity (from package com.tencent.tmgp.sgame)
[Fastbot][2024-09-14 14:52:24.623] // - NOT USING main activity com.tencent.gcloud.msdk.core.policy.MSDKPolicyActivity (from package com.tencent.tmgp.speedmobile)
[Fastbot][2024-09-14 14:52:24.623] // - NOT USING main activity com.twitpane.TwitPane (from package com.twitpane)
[Fastbot][2024-09-14 14:52:24.624] // - NOT USING main activity com.twitter.android.StartActivity (from package com.twitter.android)
[Fastbot][2024-09-14 14:52:24.624] // - NOT USING main activity com.pp.assistant.activity.PPMainActivity (from package com.wandoujia.phoenix2)
[Fastbot][2024-09-14 14:52:24.625] // - NOT USING main activity io.appium.settings.Settings (from package io.appium.settings)
[Fastbot][2024-09-14 14:52:24.625] // - NOT USING main activity io.zerion.android.ui.launch.LaunchActivity (from package io.zerion.android)
[Fastbot][2024-09-14 14:52:24.626] // - NOT USING main activity net.openvpn.unified.MainActivity (from package net.openvpn.openvpn)
[Fastbot][2024-09-14 14:52:24.626] // - NOT USING main activity com.tokenbank.activity.splash.SplashActivity (from package vip.mytokenpocket)
[Fastbot][2024-09-14 14:52:24.629] // Selecting main activities from category android.intent.category.MONKEY
[Fastbot][2024-09-14 14:52:24.630] // - NOT USING main activity com.android.settings.Settings$RunningServicesActivity (from package com.android.settings)
[Fastbot][2024-09-14 14:52:24.630] // - NOT USING main activity com.android.settings.Settings$StorageUseActivity (from package com.android.settings)
[Fastbot][2024-09-14 14:52:24.630] // - NOT USING main activity com.sec.android.app.launcher.activities.LauncherActivity (from package com.sec.android.app.launcher)
[Fastbot][2024-09-14 14:52:24.631] // - NOT USING main activity com.google.android.googlequicksearchbox.SearchActivity (from package com.google.android.googlequicksearchbox)
[Fastbot][2024-09-14 14:52:24.631] // - NOT USING main activity com.samsung.android.video.player.activity.MonkeyTestActivity (from package com.samsung.android.video)
[Fastbot][2024-09-14 14:52:27.632] // phone info: samsung_SM-A536E_14
[Fastbot][2024-09-14 14:52:27.632] // runing fastbot
[Fastbot][2024-09-14 14:52:27.647] InputMethod ID: com.samsung.android.honeyboard/.service.HoneyBoardService
[Fastbot][2024-09-14 14:52:27.648] InputMethod ID: com.google.android.tts/com.google.android.apps.speech.tts.googletts.settings.asr.voiceime.VoiceInputMethodService
[Fastbot][2024-09-14 14:52:27.655] // device serial number is R5CT43QQFQZ
[Fastbot][2024-09-14 14:52:27.723] // device uuid is 681ee3d6-6bc7-42e9-ab76-39b11c7065ed
[Fastbot][2024-09-14 14:52:30.865] // init with reuse agent
[Fastbot][2024-09-14 14:52:30.919] fastbot native : library load!
[Fastbot][2024-09-14 14:52:30.921] fastbot native path is : /data/local/tmp/arm64-v8a/libfastbot_native.so
[Fastbot][2024-09-14 14:52:30.957]

[Fastbot]*** ERROR *** findMethod() error, NoSuchMethodException happened, there is no such method: getTasks
[Fastbot][2024-09-14 14:52:30.965] // current activity is com.p.MainActivity
[Fastbot][2024-09-14 14:52:30.992] // Event id: 1
[Fastbot][2024-09-14 14:52:33.817] action type: CLICK
[Fastbot][2024-09-14 14:52:33.819] rpc cost time: 61
@ReynoldNeverSaySorry 大佬,帮忙看看呢。其中包信息敏感,我删了。另外问下大佬,你那边自定义事件是可以生效的吗?日志里有打印这块相关的日志吗?

@lilylei665
Copy link

[
{
"prob": 1,
"activity":"com.p.MainActivity",
"times": 10,
"actions": [
{
"xpath":"//android.view.View[@content-desc='人']",
"action": "CLICK",
"throttle": 3000
}
]
}
]
@ReynoldNeverSaySorry 这是自定义事件的配置

@ReynoldNeverSaySorry
Copy link

[ { "prob": 1, "activity":"com.p.MainActivity", "times": 10, "actions": [ { "xpath":"//android.view.View[@content-desc='人']", "action": "CLICK", "throttle": 3000 } ] } ] @ReynoldNeverSaySorry 这是自定义事件的配置

emmm 感觉唯一有疑问的就是xpath那的元素了...不知道你有没有解决,或者有可能是日志里的error,但是我这是没出现这个问题的

@lilylei665
Copy link

lilylei665 commented Sep 29, 2024

[ { "prob": 1, "activity":"com.p.MainActivity", "times": 10, "actions": [ { "xpath":"//android.view.View[@content-desc='人']", "action": "CLICK", "throttle": 3000 } ] } ] @ReynoldNeverSaySorry 这是自定义事件的配置

emmm 感觉唯一有疑问的就是xpath那的元素了...不知道你有没有解决,或者有可能是日志里的error,但是我这是没出现这个问题的

还没有解决。不过现在问题有一点点进展了。从日志可以查看用户自定义事件加载成功了,并且执行了。唯一有问题的就是,我观察app执行的情况,并不是每次都100%执行了用户自定义事件。还是去点了其他元素
09-24 19:02:25.363 I/Fastbot: customEvent activities com.p.MainActivity, page event is com.p.MainActivity, event times 1 , rate is 0.600000/1.000000
09-24 19:02:25.363 I/Fastbot: custom event matched: com.p.MainActivity actions size: 1
09-24 19:02:25.363 I/Fastbot: check custom action queue

09-24 19:02:25.364 D/Fastbot: begin find xpathSelector :
09-24 19:02:25.364 D/Fastbot: XPathSelector:
09-24 19:02:25.364 D/Fastbot: resourceID: text: contentDescription: 人 clazz: index: -1
09-24 19:02:25.364 D/Fastbot: UIPageElement:
09-24 19:02:25.364 D/Fastbot: resourceID: text: 人 contentDescription: clazz: android.widget.TextView index: 1
09-24 19:02:25.364 D/Fastbot: equality:
09-24 19:02:25.364 D/Fastbot: isResourceIDEqual:0 isTextEqual:0 isContentEqual:0 isClassNameEqual:0 isIndexEqual:0
09-24 19:02:25.364 I/Fastbot: custom action //android.view.View[@content-desc='人'] happened
09-24 19:02:25.365 I/Fastbot: custom action: {id: g0a0, act: CLICK, value: 0} happened
09-24 19:02:25.365 D/Fastbot: build state merged 59 widget
09-24 19:02:25.366 D/Fastbot: unvisited action: 9, visited action 0
09-24 19:02:25.366 D/Fastbot: visit id:g0s0 times 1
09-24 19:02:25.366 D/Fastbot: widget detail has been clear
09-24 19:02:25.366 E/Fastbot: {state: 12520996020835698744
09-24 19:02:25.366 E/Fastbot: widgets:
09-24 19:02:25.366 E/Fastbot: {xpath: /*[@Class="android.widget.FrameLayout"][@resource-id=""][@text=""][@content-desc=""][@Index=0][@bounds="[0,0][1080,2400]"]}

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

3 participants