appcrawler 在处理退出页面时,需要二次确认的页面无法退出,这个如何解决

jar包日志:
crawl next
2022-01-05 17:41:35 INFO [Crawler.517.getAvailableElement] selected nodes size = 3
2022-01-05 17:41:35 INFO [Crawler.554.getAvailableElement] selectedElements - black elements size = 1
2022-01-05 17:41:35 INFO [Crawler.573.getAvailableElement] selectedElements - backButton size=1
2022-01-05 17:41:35 INFO [Crawler.581.getAvailableElement] selectedElements - clicked size=0
2022-01-05 17:41:35 INFO [Crawler.588.getAvailableElement] selectedElements - skiped fresh elements size=0
2022-01-05 17:41:35 INFO [Crawler.638.getAvailableElement] next element None
2022-01-05 17:41:35 INFO [Crawler.995.crawl] com.tencent.wemeet.app.InMeetingActivity all elements had be clicked
2022-01-05 17:41:35 INFO [Crawler.880.getBackButton] go back
2022-01-05 17:41:35 INFO [Crawler.907.getBackButton] can’t find backButton button from config
2022-01-05 17:41:35 INFO [Crawler.908.getBackButton] find backButton from history
2022-01-05 17:41:35 INFO [Crawler.821.$anonfun$getPredictBackNodes$1] get nearby back button from history = com.tencent.wemeet.app.WMFlutterActivity.tag=ImageView.depth=10
2022-01-05 17:41:35 INFO [Crawler.922.getBackButton] can’t find backButton from history
2022-01-05 17:41:35 INFO [Crawler.756.beforeElementAction] com.tencent.wemeet.app.InMeetingActivity.tag=Back.depth=2.id=Back.name=Back
2022-01-05 17:41:35 INFO [Crawler.1043.doElementAction] current index = 194
2022-01-05 17:41:35 INFO [Crawler.1044.doElementAction] current xpath = //android.widget.FrameLayout[@class=‘android.widget.FrameLayout’]
2022-01-05 17:41:35 INFO [Crawler.1045.doElementAction] current action = _Back
2022-01-05 17:41:35 INFO [Crawler.1046.doElementAction] current element = com.tencent.wemeet.app.InMeetingActivity.tag=Back.depth=2.id=Back.name=Back
2022-01-05 17:41:35 INFO [Crawler.1047.doElementAction] current url = com.tencent.wemeet.app.InMeetingActivity
2022-01-05 17:41:35 INFO [Crawler.1048.doElementAction] current tag path = //android.widget.FrameLayout[@class=‘android.widget.FrameLayout’]
2022-01-05 17:41:35 INFO [Crawler.1049.doElementAction] current file name = com.tencent.wemeet.app.InMeetingActivity.tag=Back.depth=2.id=Back.name=Back
2022-01-05 17:41:35 INFO [URIElementStore.83.saveReqDom] save reqDom to 194
2022-01-05 17:41:35 INFO [Crawler.1174.saveElementScreenshot] draw element in /Users/ludong/IdeaProjects/AppCrawler/out-test/194_com.tencent.wemeet.app.InMeetingActivity.tag=Back.depth=2.id=Back.name=Back.click.png
2022-01-05 17:41:35 INFO [ScreenShot.45.clip] write png /Users/ludong/IdeaProjects/AppCrawler/out-test/194_com.tencent.wemeet.app.InMeetingActivity.tag=Back.depth=2.id=Back.name=Back.click.png
2022-01-05 17:41:35 INFO [ScreenShot.57.clip] ImageIO.write newImageName /Users/ludong/IdeaProjects/AppCrawler/out-test/194_com.tencent.wemeet.app.InMeetingActivity.tag=Back.depth=2.id=Back.name=Back.click.png
2022-01-05 17:41:36 INFO [Crawler.1063.doElementAction] back
2022-01-05 17:41:36 INFO [Crawler.1251.$anonfun$back$2] navigate back
2022-01-05 17:41:36 INFO [Crawler.1157.doElementAction] afterAllRetry = 0 because of last action not equal to after
2022-01-05 17:41:36 INFO [Crawler.1161.doElementAction] sleep 1000 ms
2022-01-05 17:41:37 INFO [Crawler.781.afterElementAction] mark image exist
2022-01-05 17:41:37 INFO [Crawler.1215.saveScreen] start screenshot
2022-01-05 17:41:37 INFO [Crawler.1220.$anonfun$saveScreen$2] ui change screenshot again
2022-01-05 17:41:42 INFO [LogicUtils$.83.asyncTask] use time 4.743 seconds name=screenshot result=success
2022-01-05 17:41:42 INFO [Crawler.1226.saveScreen] screenshot success
2022-01-05 17:41:42 INFO [Crawler.693.refreshPage] refresh page
2022-01-05 17:41:42 INFO [ReactWebDriver.88.getPageSourceWithRetry] start to get page source from appium
2022-01-05 17:41:42 INFO [ReactWebDriver.111.$anonfun$getPageSourceWithRetry$1] xml format
2022-01-05 17:41:42 INFO [Crawler.711.parsePageContext] appName = com.tencent.wemeet.app
2022-01-05 17:41:42 INFO [Crawler.373.getUri] defineUrl=
2022-01-05 17:41:42 INFO [Crawler.715.parsePageContext] url=com.tencent.wemeet.app.InMeetingActivity
2022-01-05 17:41:42 INFO [Crawler.742.parsePageContext] currentContentHash=1e73d796b76cce0756f3e4b6d286f246 lastContentHash=9ad66c9225974a9fa4c56cf95d5a4538
2022-01-05 17:41:42 INFO [Crawler.744.parsePageContext] ui change
2022-01-05 17:41:42 INFO [Crawler.1201.saveDom] save to /Users/ludong/IdeaProjects/AppCrawler/out-test/194_com.tencent.wemeet.app.InMeetingActivity.tag=Back.depth=2.id=Back.name=Back.clicked.xml
2022-01-05 17:41:42 INFO [URIElementStore.90.saveResDom] save resDom to 194
2022-01-05 17:41:42 INFO [ReportPlugin.46.needReport] read command from /Users/ludong/IdeaProjects/AppCrawler/out-test/request
2022-01-05 17:41:42 INFO [ReportPlugin.52.needReport]
2022-01-05 17:41:42 INFO [Crawler.945.crawl] crawl use 7490 ms
2022-01-05 17:41:42 INFO [Crawler.953.crawl]

一直在循环

加个trigger,把确认按钮加进去,这样就会先点击trigger中的规则了。

配置了triggerActions,firstLilst,还是无法退出

配置如下:

triggerActions:
  - given: []
    when: null
    then: []
    xpath: "permission_allow_button"
    action: ""
    actions: []
    times: 3
  - given: []
    when: null
    then: []
    xpath: "允许"
    action: ""
    actions: []
    times: 3
  - given: []
    when: null
    then: []
    xpaht: "//*[contains(@text, '结束会议')]"
    action: click
    actions: []
    times: 100
  - given: []
    when: null
    then: []
    xpaht: "//*[contains(@text, '离开会议')]"
    action: click
    actions: []
    times: 100
  - given: []
    when: null
    then: []
    xpaht: "同意"
    action: click
    actions: []
    times: 3```
  • 从日志看,没有看到triggerActions生效
  • 有可能是因为设置了times为3 在前面的操作中已经消耗掉了 或者配置文件写的不太正确导致没有加载进来
  • 可以把日志文件的开头贴一下看看 还有第一次开始back的日志 以及完整的配置文件
关闭