appcrawler来遍历bili,设置triggerActions自动登录。但是遍历时,模拟器bili打开了登录页面,然后bili客户端就关闭了

appcrawler来遍历bili,设置triggerActions自动登录。但是遍历时,模拟器bili打开了登录页面,然后bili客户端就关闭了,是什么原因呢?


发下具体日志看看

Derrick:appcrawler hupo$ java -jar appcrawler-2.4.0-jar-with-dependencies.jar --capability “appPackage=com.hotbitmapgg.ohmybilibili,appActivity=com.hotbitmapgg.bilibili.module.common.LoginActivity” -c bilili.yml
2021-10-17 18:47:53 INFO [AppCrawler$.86.main]

AppCrawler 2.4.0 [霍格沃兹测试学院特别纪念版]
Appium 1.8.1 Java8 tested
app爬虫, 用于自动遍历测试. 支持Android和iOS, 支持真机和模拟器
项目地址: https://github.com/seveniruby/AppCrawler
移动测试技术交流: https://testerhome.com
联络作者: seveniruby@testerhome.com (思寒)
致谢: 晓光 泉龙 杨榕 恒温 mikezhou yaming116 沐木


2021-10-17 18:47:53 INFO [AppCrawler$.203.parseParams] Find Conf /Derrick/hogwarts/demo/appcrawler/bilili.yml
2021-10-17 18:47:53 INFO [AppCrawler$.226.parseParams] use appium in the config file http://127.0.0.1:4723/wd/hub
2021-10-17 18:47:53 INFO [AppCrawler$.230.parseParams] appium address = Some(http://127.0.0.1:4723/wd/hub)
2021-10-17 18:47:53 INFO [AppCrawler$.238.parseParams] use conf in config file
2021-10-17 18:47:53 INFO [AppCrawler$.242.parseParams] result directory = 202110170000
2021-10-17 18:47:53 INFO [Crawler.130.start] set xpath attribute with List(name, label, value, resource-id, content-desc, instance, text)
2021-10-17 18:47:53 INFO [Crawler.135.start] set xpath
2021-10-17 18:47:53 INFO [Crawler.89.$anonfun$loadPlugins$2] com.testerhome.appcrawler.plugin.TagLimitPlugin@1f9f381d
2021-10-17 18:47:53 INFO [Crawler.89.$anonfun$loadPlugins$2] com.testerhome.appcrawler.plugin.ReportPlugin@7c8c70d6
2021-10-17 18:47:53 INFO [Crawler.89.$anonfun$loadPlugins$2] com.testerhome.appcrawler.plugin.FreeMind@6edf29c1
2021-10-17 18:47:53 INFO [TagLimitPlugin.19.init] com.testerhome.appcrawler.plugin.TagLimitPlugin init
2021-10-17 18:47:53 INFO [ReportPlugin.19.init] com.testerhome.appcrawler.plugin.ReportPlugin init
2021-10-17 18:47:53 INFO [FreeMind.19.init] com.testerhome.appcrawler.plugin.FreeMind init
2021-10-17 18:47:53 INFO [ReportPlugin.21.start] reportPath=/Derrick/hogwarts/demo/appcrawler/202110170000
2021-10-17 18:47:53 INFO [ReportPlugin.24.start] create /Derrick/hogwarts/demo/appcrawler/202110170000/tmp/ directory
2021-10-17 18:47:53 INFO [Crawler.138.start] prepare setup Appium
2021-10-17 18:47:53 INFO [Crawler.250.setupAppium] afterPageMax=2
2021-10-17 18:47:55 INFO [Crawler.273.setupAppium] use AppiumClient
2021-10-17 18:47:55 INFO [Crawler.274.setupAppium] Map(appActivity → com.hotbitmapgg.bilibili.module.common.LoginActivity, appium → http://127.0.0.1:4723/wd/hub, noReset → true, appPackage → com.hotbitmapgg.ohmybilibili, fullReset → false)
十月 17, 2021 6:48:04 下午 io.appium.java_client.remote.AppiumCommandExecutor$1 lambda$0
信息: Detected dialect: W3C
2021-10-17 18:48:04 INFO [AppiumClient.120.getDeviceInfo] screenWidth=1170 screenHeight=1872
2021-10-17 18:48:04 INFO [AppiumClient.112.appium] capture dir = /Derrick/hogwarts/demo/appcrawler/.
2021-10-17 18:48:04 INFO [Crawler.278.setupAppium] com.testerhome.appcrawler.driver.AppiumClient@12952aff
2021-10-17 18:48:04 INFO [Crawler.145.start] platformName= driver=com.testerhome.appcrawler.driver.AppiumClient@12952aff
2021-10-17 18:48:04 INFO [Crawler.146.start]

AppCrawler 2.4.0 [霍格沃兹测试学院特别纪念版]
Appium 1.8.1 Java8 tested
app爬虫, 用于自动遍历测试. 支持Android和iOS, 支持真机和模拟器
项目地址: https://github.com/seveniruby/AppCrawler
移动测试技术交流: https://testerhome.com
联络作者: seveniruby@testerhome.com (思寒)
致谢: 晓光 泉龙 杨榕 恒温 mikezhou yaming116 沐木


2021-10-17 18:48:04 INFO [Crawler.147.start] waiting for app load
2021-10-17 18:48:10 INFO [Crawler.149.start] driver=null
2021-10-17 18:48:10 INFO [Crawler.150.start] get screen info
2021-10-17 18:48:10 INFO [AppiumClient.120.getDeviceInfo] screenWidth=1170 screenHeight=1872
2021-10-17 18:48:10 INFO [Crawler.627.refreshPage] refresh page
2021-10-17 18:48:10 INFO [AppiumClient.102.getPageSourceWithRetry] start to get page source from appium
2021-10-17 18:48:10 INFO [AppiumClient.117.$anonfun$getPageSourceWithRetry$1] xml format
2021-10-17 18:48:10 INFO [Crawler.645.parsePageContext] appName =
2021-10-17 18:48:10 INFO [Crawler.649.parsePageContext] url=LoginActivity
2021-10-17 18:48:10 INFO [Crawler.673.parsePageContext] currentContentHash=cc63e19e07aa75115c4d35c279c8ae85 lastContentHash=cc63e19e07aa75115c4d35c279c8ae85
2021-10-17 18:48:10 INFO [DataRecord.24.isDiff] just only record return false
2021-10-17 18:48:10 INFO [Crawler.677.parsePageContext] ui not change
2021-10-17 18:48:10 INFO [Crawler.230.firstRefresh] first refresh
2021-10-17 18:48:10 INFO [Crawler.996.doElementAction] current element = LoginActivity.tag=start.id=start
2021-10-17 18:48:10 INFO [Crawler.997.doElementAction] current index = 0
2021-10-17 18:48:10 INFO [Crawler.998.doElementAction] current action =
2021-10-17 18:48:10 INFO [Crawler.999.doElementAction] current xpath = Start-Start-0
2021-10-17 18:48:10 INFO [Crawler.1000.doElementAction] current url = LoginActivity
2021-10-17 18:48:10 INFO [Crawler.1001.doElementAction] current tag path =
2021-10-17 18:48:10 INFO [Crawler.1002.doElementAction] current file name = LoginActivity.tag=start.id=start
2021-10-17 18:48:10 INFO [AppCrawler$.59.saveReqHash] save reqHash to 0
2021-10-17 18:48:10 INFO [AppCrawler$.92.saveReqImg] save reqImg 202110170000/0_LoginActivity.tag=start.id=start.click.png to 0
2021-10-17 18:48:10 INFO [AppCrawler$.76.saveReqDom] save reqDom to 0
2021-10-17 18:48:10 INFO [Crawler.1014.doElementAction] just log
2021-10-17 18:48:10 INFO [Crawler.1015.doElementAction] {
“url” : “LoginActivity”,
“tag” : “start”,
“id” : “start”,
“name” : “”,
“text” : “”,
“instance” : “”,
“depth” : “”,
“valid” : “true”,
“selected” : “false”,
“xpath” : “Start-Start-0”,
“ancestor” : “”,
“x” : 0,
“y” : 0,
“width” : 0,
“height” : 0
}
2021-10-17 18:48:10 INFO [Crawler.1126.doElementAction] mark image exist
2021-10-17 18:48:10 INFO [Crawler.1130.doElementAction] sleep 500 for loading
2021-10-17 18:48:11 INFO [Crawler.627.refreshPage] refresh page
2021-10-17 18:48:11 INFO [AppiumClient.102.getPageSourceWithRetry] start to get page source from appium
2021-10-17 18:48:11 INFO [AppiumClient.117.$anonfun$getPageSourceWithRetry$1] xml format
2021-10-17 18:48:11 INFO [Crawler.645.parsePageContext] appName =
2021-10-17 18:48:11 INFO [Crawler.649.parsePageContext] url=LoginActivity
2021-10-17 18:48:11 INFO [Crawler.673.parsePageContext] currentContentHash=cc63e19e07aa75115c4d35c279c8ae85 lastContentHash=cc63e19e07aa75115c4d35c279c8ae85
2021-10-17 18:48:11 INFO [Crawler.677.parsePageContext] ui not change
2021-10-17 18:48:11 INFO [Crawler.931.saveDom] save to 202110170000/0_LoginActivity.tag=start.id=start.dom
2021-10-17 18:48:11 INFO [Crawler.953.saveScreen] start screenshot
2021-10-17 18:48:11 INFO [Crawler.956.$anonfun$saveScreen$2] ui change screenshot again
2021-10-17 18:48:11 INFO [Crawler.977.saveScreen] screenshot success
2021-10-17 18:48:11 INFO [AppCrawler$.67.saveResHash] save resHash to 0
2021-10-17 18:48:11 INFO [AppCrawler$.101.saveResImg] save resImg 202110170000/0_LoginActivity.tag=start.id=start.clicked.png to 0
2021-10-17 18:48:11 INFO [AppCrawler$.84.saveResDom] save resDom to 0
2021-10-17 18:48:11 INFO [Crawler.159.start] append current app name to appWhiteList
2021-10-17 18:48:11 INFO [Crawler.163.start] run steps
2021-10-17 18:48:11 INFO [Crawler.237.runSteps] run testcases
AutomationSuite:
2021-10-17 18:48:11 INFO [AutomationSuite.13.beforeAll] beforeAll
2021-10-17 18:48:11 INFO [AutomationSuite.21.$anonfun$new$1] testcase start
2021-10-17 18:48:11 INFO [AutomationSuite.28.$anonfun$new$2] Step(List(),null,List(),//,Thread.sleep(5000),List(),0)
2021-10-17 18:48:11 INFO [AutomationSuite.31.$anonfun$new$2] //

2021-10-17 18:48:11 INFO [AutomationSuite.32.$anonfun$new$2] Thread.sleep(5000)
2021-10-17 18:48:11 INFO [Crawler.996.doElementAction] current element = Steps.tag=LinearLayout.depth=5.id=action_bar_root
2021-10-17 18:48:11 INFO [Crawler.997.doElementAction] current index = 1
2021-10-17 18:48:11 INFO [Crawler.998.doElementAction] current action = Thread.sleep(5000)
2021-10-17 18:48:11 INFO [Crawler.999.doElementAction] current xpath = //*[@resource-id=“com.hotbitmapgg.ohmybilibili:id/action_bar_root”]
2021-10-17 18:48:11 INFO [Crawler.1000.doElementAction] current url = Steps
2021-10-17 18:48:11 INFO [Crawler.1001.doElementAction] current tag path = hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout
2021-10-17 18:48:11 INFO [Crawler.1002.doElementAction] current file name = Steps.tag=LinearLayout.depth=5.id=action_bar_root
2021-10-17 18:48:11 INFO [AppCrawler$.59.saveReqHash] save reqHash to 1
2021-10-17 18:48:11 INFO [AppCrawler$.92.saveReqImg] save reqImg 202110170000/1_Steps.tag=LinearLayout.depth=5.id=action_bar_root.click.png to 1
2021-10-17 18:48:11 INFO [AppCrawler$.76.saveReqDom] save reqDom to 1
2021-10-17 18:48:11 INFO [Util$.63.dsl] eval Thread.sleep(5000)
2021-10-17 18:48:11 INFO [Util$.73.eval] first import
import sys.process._
driver: com.testerhome.appcrawler.driver.ReactWebDriver = com.testerhome.appcrawler.driver.AppiumClient@12952aff
crawl: (depth: Int)Unit
2021-10-17 18:48:15 INFO [Util$.79.eval] Thread.sleep(5000)
2021-10-17 18:48:20 INFO [Util$.80.eval] Success
2021-10-17 18:48:20 INFO [Util$.81.eval] eval finish
2021-10-17 18:48:20 INFO [Util$.65.dsl] ()
2021-10-17 18:48:20 INFO [Util$.68.dsl] eval finish
2021-10-17 18:48:20 INFO [Crawler.1123.doElementAction] use last clicked image replace mark
2021-10-17 18:48:20 INFO [Crawler.1130.doElementAction] sleep 500 for loading
2021-10-17 18:48:20 INFO [Crawler.627.refreshPage] refresh page
2021-10-17 18:48:20 INFO [AppiumClient.102.getPageSourceWithRetry] start to get page source from appium
2021-10-17 18:48:20 INFO [AppiumClient.117.$anonfun$getPageSourceWithRetry$1] xml format
2021-10-17 18:48:20 INFO [Crawler.645.parsePageContext] appName =
2021-10-17 18:48:21 INFO [Crawler.649.parsePageContext] url=LoginActivity
2021-10-17 18:48:21 INFO [Crawler.673.parsePageContext] currentContentHash=cc63e19e07aa75115c4d35c279c8ae85 lastContentHash=cc63e19e07aa75115c4d35c279c8ae85
2021-10-17 18:48:21 INFO [Crawler.677.parsePageContext] ui not change
2021-10-17 18:48:21 INFO [Crawler.931.saveDom] save to 202110170000/1_Steps.tag=LinearLayout.depth=5.id=action_bar_root.dom
2021-10-17 18:48:21 INFO [Crawler.953.saveScreen] start screenshot
2021-10-17 18:48:21 INFO [Crawler.956.$anonfun$saveScreen$2] ui change screenshot again
2021-10-17 18:48:21 INFO [Crawler.977.saveScreen] screenshot success
2021-10-17 18:48:21 INFO [AppCrawler$.67.saveResHash] save resHash to 1
2021-10-17 18:48:21 INFO [AppCrawler$.101.saveResImg] save resImg 202110170000/1_Steps.tag=LinearLayout.depth=5.id=action_bar_root.clicked.png to 1
2021-10-17 18:48:21 INFO [AppCrawler$.84.saveResDom] save resDom to 1
2021-10-17 18:48:21 INFO [AutomationSuite.66.$anonfun$new$1] finish run steps

  • run steps
    2021-10-17 18:48:21 INFO [Crawler.627.refreshPage] refresh page
    2021-10-17 18:48:21 INFO [AppiumClient.102.getPageSourceWithRetry] start to get page source from appium
    2021-10-17 18:48:21 INFO [AppiumClient.117.$anonfun$getPageSourceWithRetry$1] xml format
    2021-10-17 18:48:21 INFO [Crawler.645.parsePageContext] appName =
    2021-10-17 18:48:21 INFO [Crawler.649.parsePageContext] url=LoginActivity
    2021-10-17 18:48:21 INFO [Crawler.673.parsePageContext] currentContentHash=cc63e19e07aa75115c4d35c279c8ae85 lastContentHash=cc63e19e07aa75115c4d35c279c8ae85
    2021-10-17 18:48:21 INFO [Crawler.677.parsePageContext] ui not change
    2021-10-17 18:48:21 INFO [Crawler.1213.handleCtrlC] add shutdown hook
    2021-10-17 18:48:21 INFO [Crawler.772.crawl]

crawl next
2021-10-17 18:48:21 INFO [Crawler.425.needReturn] urlStack=Stack(LoginActivity) baseUrl=List() maxDepth=10
2021-10-17 18:48:21 INFO [Crawler.834.crawl] no need to back
2021-10-17 18:48:21 INFO [Crawler.487.getAvailableElement] selected nodes size = 3
2021-10-17 18:48:21 INFO [Crawler.499.getAvailableElement] all - black elements size = 3
2021-10-17 18:48:21 INFO [Crawler.528.getAvailableElement] all - first - last elements size = 3
2021-10-17 18:48:21 INFO [Crawler.590.getAvailableElement] all - backButton size=3
2021-10-17 18:48:21 INFO [Crawler.598.getAvailableElement] all - clicked size=3
2021-10-17 18:48:21 INFO [Crawler.605.getAvailableElement] all - skiped fresh elements size=3
2021-10-17 18:48:21 INFO [Crawler.843.crawl] found LoginActivity.tag=ImageButton.depth=10 by first available element
2021-10-17 18:48:21 INFO [Crawler.728.setElementAction] set action to click
2021-10-17 18:48:21 INFO [Crawler.996.doElementAction] current element = LoginActivity.tag=ImageButton.depth=10
2021-10-17 18:48:21 INFO [Crawler.997.doElementAction] current index = 2
2021-10-17 18:48:21 INFO [Crawler.998.doElementAction] current action = click
2021-10-17 18:48:21 INFO [Crawler.999.doElementAction] current xpath = //[@resource-id=“com.hotbitmapgg.ohmybilibili:id/action_bar_root”]//[@resource-id=“android:id/content”]//*[@resource-id=“com.hotbitmapgg.ohmybilibili:id/toolbar”]
2021-10-17 18:48:21 INFO [Crawler.1000.doElementAction] current url = LoginActivity
2021-10-17 18:48:21 INFO [Crawler.1001.doElementAction] current tag path = hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.LinearLayout/android.view.ViewGroup/android.widget.ImageButton
2021-10-17 18:48:21 INFO [Crawler.1002.doElementAction] current file name = LoginActivity.tag=ImageButton.depth=10
2021-10-17 18:48:21 INFO [AppCrawler$.59.saveReqHash] save reqHash to 2
2021-10-17 18:48:21 INFO [AppCrawler$.92.saveReqImg] save reqImg 202110170000/2_LoginActivity.tag=ImageButton.depth=10.click.png to 2
2021-10-17 18:48:21 INFO [AppCrawler$.76.saveReqDom] save reqDom to 2
2021-10-17 18:48:21 INFO [Crawler.1071.doElementAction] need input click
2021-10-17 18:48:21 INFO [AppiumClient.53.findElementByURI] find by uri element= LoginActivity.tag=ImageButton.depth=10
2021-10-17 18:48:21 INFO [AppiumClient.245.findElementsByURI] findElementByAndroidUIAutomator new UiSelector().className(“android.widget.ImageButton”)
2021-10-17 18:48:21 INFO [AppiumClient.60.findElementByURI] find by xpath success
2021-10-17 18:48:21 INFO [Crawler.1080.doElementAction] mark 202110170000/1_Steps.tag=LinearLayout.depth=5.id=action_bar_root.clicked.png to 202110170000/2_LoginActivity.tag=ImageButton.depth=10.click.png
2021-10-17 18:48:21 INFO [AppiumClient.141.mark] read from 202110170000/1_Steps.tag=LinearLayout.depth=5.id=action_bar_root.clicked.png
2021-10-17 18:48:22 INFO [AppiumClient.154.mark] write png 202110170000/1_Steps.tag=LinearLayout.depth=5.id=action_bar_root.clicked.png
2021-10-17 18:48:22 INFO [AppiumClient.161.mark] ImageIO.write newImageName 202110170000/2_LoginActivity.tag=ImageButton.depth=10.click.png
2021-10-17 18:48:22 INFO [Crawler.1095.$anonfun$doElementAction$5] click element
2021-10-17 18:48:22 INFO [AppiumClient.174.click] [[io.appium.java_client.android.AndroidDriver, Capabilities: {app=, appActivity=com.hotbitmapgg.bilibili.module.common.LoginActivity, appPackage=com.hotbitmapgg.ohmybilibili, appium=http://127.0.0.1:4723/wd/hub, databaseEnabled=false, desired={platformName=android, appium=http://127.0.0.1:4723/wd/hub, app=, appActivity=com.hotbitmapgg.bilibili.module.common.LoginActivity, appPackage=com.hotbitmapgg.ohmybilibili, deviceName=demo, fullReset=false, noReset=true}, deviceApiLevel=23, deviceManufacturer=Netease, deviceModel=MuMu, deviceName=emulator-5554, deviceScreenDensity=416, deviceScreenSize=1170x1872, deviceUDID=emulator-5554, fullReset=false, javascriptEnabled=true, locationContextEnabled=false, networkConnectionEnabled=true, noReset=true, pixelRatio=2.6000001, platform=LINUX, platformName=Android, platformVersion=6.0.1, statBarHeight=62, takesScreenshot=true, viewportRect={left=0, top=62, width=1170, height=1810}, warnings={}, webStorageEnabled=false}] → -android uiautomator: new UiSelector().className(“android.widget.ImageButton”)]
2021-10-17 18:48:23 INFO [Crawler.1126.doElementAction] mark image exist
2021-10-17 18:48:23 INFO [Crawler.1130.doElementAction] sleep 500 for loading
2021-10-17 18:48:23 INFO [Crawler.627.refreshPage] refresh page
2021-10-17 18:48:23 INFO [AppiumClient.102.getPageSourceWithRetry] start to get page source from appium
2021-10-17 18:48:24 INFO [AppiumClient.117.$anonfun$getPageSourceWithRetry$1] xml format
2021-10-17 18:48:24 INFO [Crawler.645.parsePageContext] appName =
2021-10-17 18:48:24 INFO [Crawler.649.parsePageContext] url=Launcher
2021-10-17 18:48:24 INFO [Crawler.673.parsePageContext] currentContentHash=807fc1a1c3d82c99c327946ce08e478e lastContentHash=cc63e19e07aa75115c4d35c279c8ae85
2021-10-17 18:48:24 INFO [Crawler.675.parsePageContext] ui change
2021-10-17 18:48:24 INFO [Crawler.931.saveDom] save to 202110170000/2_LoginActivity.tag=ImageButton.depth=10.dom
2021-10-17 18:48:24 INFO [Crawler.953.saveScreen] start screenshot
2021-10-17 18:48:24 INFO [Crawler.956.$anonfun$saveScreen$2] ui change screenshot again
2021-10-17 18:48:26 INFO [Crawler.977.saveScreen] screenshot success
2021-10-17 18:48:26 INFO [AppCrawler$.67.saveResHash] save resHash to 2
2021-10-17 18:48:26 INFO [AppCrawler$.101.saveResImg] save resImg 202110170000/2_LoginActivity.tag=ImageButton.depth=10.clicked.png to 2
2021-10-17 18:48:26 INFO [AppCrawler$.84.saveResDom] save resDom to 2
2021-10-17 18:48:26 INFO [Crawler.709.afterElementAction] backRetry=0
2021-10-17 18:48:26 INFO [Crawler.712.afterElementAction] afterElementAction eval
2021-10-17 18:48:26 INFO [ReportPlugin.36.afterElementAction] clickedElementsList size = 3
2021-10-17 18:48:26 INFO [Crawler.772.crawl]

crawl next
2021-10-17 18:48:26 INFO [Crawler.425.needReturn] urlStack=Stack(Launcher, LoginActivity) baseUrl=List() maxDepth=10
2021-10-17 18:48:26 INFO [Crawler.834.crawl] no need to back
2021-10-17 18:48:26 INFO [Crawler.487.getAvailableElement] selected nodes size = 17
2021-10-17 18:48:26 INFO [Crawler.499.getAvailableElement] all - black elements size = 17
2021-10-17 18:48:26 INFO [Crawler.528.getAvailableElement] all - first - last elements size = 17
2021-10-17 18:48:26 INFO [Crawler.590.getAvailableElement] all - backButton size=17
2021-10-17 18:48:26 INFO [Crawler.598.getAvailableElement] all - clicked size=17
2021-10-17 18:48:26 INFO [Crawler.605.getAvailableElement] all - skiped fresh elements size=17
2021-10-17 18:48:26 INFO [Crawler.843.crawl] found Launcher.tag=TextView.depth=11.id=folder_icon_name.text=系统应用 by first available element
2021-10-17 18:48:26 INFO [Crawler.728.setElementAction] set action to click
2021-10-17 18:48:26 INFO [Crawler.996.doElementAction] current element = Launcher.tag=TextView.depth=11.id=folder_icon_name.text=系统应用
2021-10-17 18:48:26 INFO [Crawler.997.doElementAction] current index = 3
2021-10-17 18:48:26 INFO [Crawler.998.doElementAction] current action = click
2021-10-17 18:48:26 INFO [Crawler.999.doElementAction] current xpath = //[@resource-id=“android:id/content”]//[@resource-id=“com.mumu.launcher:id/launcher”]//[@resource-id=“com.mumu.launcher:id/drag_layer”]//[@resource-id=“com.mumu.launcher:id/workspace”]//[@content-desc=“文件夹:系统应用”]//[@text=“系统应用” and @resource-id=“com.mumu.launcher:id/folder_icon_name”]
2021-10-17 18:48:26 INFO [Crawler.1000.doElementAction] current url = Launcher
2021-10-17 18:48:26 INFO [Crawler.1001.doElementAction] current tag path = hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.view.ViewGroup/android.view.ViewGroup/android.view.ViewGroup/android.widget.LinearLayout/android.widget.TextView
2021-10-17 18:48:26 INFO [Crawler.1002.doElementAction] current file name = Launcher.tag=TextView.depth=11.id=folder_icon_name.text=系统应用
2021-10-17 18:48:26 INFO [AppCrawler$.59.saveReqHash] save reqHash to 3
2021-10-17 18:48:26 INFO [AppCrawler$.92.saveReqImg] save reqImg 202110170000/3_Launcher.tag=TextView.depth=11.id=folder_icon_name.text=系统应用.click.png to 3
2021-10-17 18:48:26 INFO [AppCrawler$.76.saveReqDom] save reqDom to 3
2021-10-17 18:48:26 INFO [Crawler.1071.doElementAction] need input click
2021-10-17 18:48:26 INFO [AppiumClient.53.findElementByURI] find by uri element= Launcher.tag=TextView.depth=11.id=folder_icon_name.text=系统应用
2021-10-17 18:48:26 INFO [AppiumClient.245.findElementsByURI] findElementByAndroidUIAutomator new UiSelector().className(“android.widget.TextView”).text(“系统应用”).resourceId(“com.mumu.launcher:id/folder_icon_name”)
2021-10-17 18:48:26 INFO [AppiumClient.60.findElementByURI] find by xpath success
2021-10-17 18:48:26 INFO [Crawler.1080.doElementAction] mark 202110170000/2_LoginActivity.tag=ImageButton.depth=10.clicked.png to 202110170000/3_Launcher.tag=TextView.depth=11.id=folder_icon_name.text=系统应用.click.png
2021-10-17 18:48:26 INFO [AppiumClient.141.mark] read from 202110170000/2_LoginActivity.tag=ImageButton.depth=10.clicked.png
2021-10-17 18:48:26 INFO [AppiumClient.146.mark] scale the origin image
2021-10-17 18:48:26 INFO [AppiumClient.154.mark] write png 202110170000/2_LoginActivity.tag=ImageButton.depth=10.clicked.png
2021-10-17 18:48:26 INFO [AppiumClient.156.mark] scale the origin image and save
2021-10-17 18:48:26 ERROR [AppiumClient.237.asyncTask] exception
2021-10-17 18:48:26 ERROR [AppiumClient.238.asyncTask] java.awt.image.RasterFormatException: (y + height) is outside of Raster
2021-10-17 18:48:26 ERROR [AppiumClient.239.asyncTask] java.util.concurrent.FutureTask.report(FutureTask.java:122)
java.util.concurrent.FutureTask.get(FutureTask.java:206)
com.testerhome.appcrawler.driver.ReactWebDriver.$anonfun$asyncTask$1(ReactWebDriver.scala:223)
scala.util.Try$.apply(Try.scala:209)
com.testerhome.appcrawler.driver.ReactWebDriver.asyncTask(ReactWebDriver.scala:214)
com.testerhome.appcrawler.driver.ReactWebDriver.asyncTask$(ReactWebDriver.scala:212)
com.testerhome.appcrawler.driver.AppiumClient.asyncTask(AppiumClient.scala:28)
com.testerhome.appcrawler.Crawler.doElementAction(Crawler.scala:1082)
com.testerhome.appcrawler.Crawler.crawl(Crawler.scala:898)
com.testerhome.appcrawler.Crawler.$anonfun$crawl$1(Crawler.scala:187)
scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
scala.util.Try$.apply(Try.scala:209)
com.testerhome.appcrawler.Crawler.crawl(Crawler.scala:187)
com.testerhome.appcrawler.Crawler.start(Crawler.scala:170)
com.testerhome.appcrawler.AppCrawler$.startCrawl(AppCrawler.scala:322)
com.testerhome.appcrawler.AppCrawler$.parseParams(AppCrawler.scala:290)
com.testerhome.appcrawler.AppCrawler$.main(AppCrawler.scala:91)
com.testerhome.appcrawler.AppCrawler.main(AppCrawler.scala)
2021-10-17 18:48:26 INFO [Crawler.1095.$anonfun$doElementAction$5] click element
2021-10-17 18:48:26 INFO [AppiumClient.174.click] [[io.appium.java_client.android.AndroidDriver, Capabilities: {app=, appActivity=com.hotbitmapgg.bilibili.module.common.LoginActivity, appPackage=com.hotbitmapgg.ohmybilibili, appium=http://127.0.0.1:4723/wd/hub, databaseEnabled=false, desired={platformName=android, appium=http://127.0.0.1:4723/wd/hub, app=, appActivity=com.hotbitmapgg.bilibili.module.common.LoginActivity, appPackage=com.hotbitmapgg.ohmybilibili, deviceName=demo, fullReset=false, noReset=true}, deviceApiLevel=23, deviceManufacturer=Netease, deviceModel=MuMu, deviceName=emulator-5554, deviceScreenDensity=416, deviceScreenSize=1170x1872, deviceUDID=emulator-5554, fullReset=false, javascriptEnabled=true, locationContextEnabled=false, networkConnectionEnabled=true, noReset=true, pixelRatio=2.6000001, platform=LINUX, platformName=Android, platformVersion=6.0.1, statBarHeight=62, takesScreenshot=true, viewportRect={left=0, top=62, width=1170, height=1810}, warnings={}, webStorageEnabled=false}] → -android uiautomator: new UiSelector().className(“android.widget.TextView”).text(“系统应用”).resourceId(“com.mumu.launcher:id/folder_icon_name”)]
^C2021-10-17 18:48:27 INFO [Crawler.1198.stop] ctrl c interval = 0
2021-10-17 18:48:27 INFO [Crawler.917.saveLog] save log to 202110170000/elements.yml
2021-10-17 18:48:27 INFO [Report$.20.saveTestCase] save testcase
2021-10-17 18:48:27 INFO [Report$.28.$anonfun$saveTestCase$2] gen testcase class Steps
2021-10-17 18:48:27 INFO [Report$.28.$anonfun$saveTestCase$2] gen testcase class LoginActivity
2021-10-17 18:48:27 INFO [Report$.28.$anonfun$saveTestCase$2] gen testcase class Launcher
2021-10-17 18:48:27 INFO [Report$.64.runTestCase] run -R 202110170000/tmp/ -oF -u 202110170000 -h 202110170000
Discovery starting.
2021-10-17 18:48:27 INFO [Steps.25.addTestCase] 1
2021-10-17 18:48:27 INFO [Steps.28.addTestCase] show all elements
2021-10-17 18:48:27 INFO [Steps.37.addTestCase] 1
2021-10-17 18:48:27 INFO [Launcher.25.addTestCase] 1
2021-10-17 18:48:27 INFO [Launcher.28.addTestCase] show all elements
2021-10-17 18:48:27 INFO [Launcher.37.addTestCase] 1
2021-10-17 18:48:27 INFO [LoginActivity.25.addTestCase] 2
2021-10-17 18:48:27 INFO [LoginActivity.28.addTestCase] show all elements
2021-10-17 18:48:27 INFO [LoginActivity.37.addTestCase] 2
Discovery completed in 19 milliseconds.
Run starting. Expected test count is: 4
Steps:

  • clickedIndex=1 action=Clicked
    xpath=//*[@resource-id=“com.hotbitmapgg.ohmybilibili:id/action_bar_root”]
    +



after clicked

2021-10-17 18:48:28 INFO [Crawler.1123.doElementAction] use last clicked image replace mark
2021-10-17 18:48:28 INFO [Crawler.1130.doElementAction] sleep 500 for loading
2021-10-17 18:48:29 INFO [Crawler.627.refreshPage] refresh page
2021-10-17 18:48:29 INFO [AppiumClient.102.getPageSourceWithRetry] start to get page source from appium
2021-10-17 18:48:29 INFO [AppiumClient.117.$anonfun$getPageSourceWithRetry$1] xml format
2021-10-17 18:48:29 INFO [Crawler.645.parsePageContext] appName =
2021-10-17 18:48:29 INFO [Crawler.649.parsePageContext] url=Launcher
2021-10-17 18:48:29 INFO [Crawler.673.parsePageContext] currentContentHash=807fc1a1c3d82c99c327946ce08e478e lastContentHash=807fc1a1c3d82c99c327946ce08e478e
2021-10-17 18:48:29 INFO [Crawler.677.parsePageContext] ui not change
2021-10-17 18:48:29 INFO [Crawler.931.saveDom] save to 202110170000/3_Launcher.tag=TextView.depth=11.id=folder_icon_name.text=系统应用.dom
2021-10-17 18:48:29 INFO [Crawler.953.saveScreen] start screenshot
2021-10-17 18:48:29 INFO [Crawler.956.$anonfun$saveScreen$2] ui change screenshot again
^C2021-10-17 18:48:29 INFO [Crawler.1198.stop] ctrl c interval = 0
2021-10-17 18:48:29 INFO [Crawler.917.saveLog] save log to 202110170000/elements.yml
2021-10-17 18:48:29 INFO [Report$.20.saveTestCase] save testcase
2021-10-17 18:48:29 INFO [Report$.28.$anonfun$saveTestCase$2] gen testcase class Steps
2021-10-17 18:48:29 ERROR [SuiteToClass$.43.genTestCaseClass] makeClass error with Steps
2021-10-17 18:48:29 INFO [Report$.28.$anonfun$saveTestCase$2] gen testcase class LoginActivity
2021-10-17 18:48:29 ERROR [SuiteToClass$.43.genTestCaseClass] makeClass error with LoginActivity
2021-10-17 18:48:29 INFO [Report$.28.$anonfun$saveTestCase$2] gen testcase class Launcher
2021-10-17 18:48:29 ERROR [SuiteToClass$.43.genTestCaseClass] makeClass error with Launcher
2021-10-17 18:48:29 INFO [Report$.64.runTestCase] run -R 202110170000/tmp/ -oF -u 202110170000 -h 202110170000
Discovery starting.
2021-10-17 18:48:29 INFO [Steps.30.initLog] already exist
2021-10-17 18:48:29 INFO [Steps.25.addTestCase] 1
2021-10-17 18:48:29 INFO [Steps.28.addTestCase] show all elements
2021-10-17 18:48:29 INFO [Steps.37.addTestCase] 1
2021-10-17 18:48:29 INFO [Launcher.30.initLog] already exist
2021-10-17 18:48:29 INFO [Launcher.25.addTestCase] 1
2021-10-17 18:48:29 INFO [Launcher.28.addTestCase] show all elements
2021-10-17 18:48:29 INFO [Launcher.37.addTestCase] 1
2021-10-17 18:48:29 INFO [LoginActivity.30.initLog] already exist
2021-10-17 18:48:29 INFO [LoginActivity.25.addTestCase] 2
2021-10-17 18:48:29 INFO [LoginActivity.28.addTestCase] show all elements
2021-10-17 18:48:29 INFO [LoginActivity.37.addTestCase] 2
Discovery completed in 16 milliseconds.
Run starting. Expected test count is: 4
Steps:

  • clickedIndex=1 action=Clicked
    xpath=//*[@resource-id=“com.hotbitmapgg.ohmybilibili:id/action_bar_root”]
    +



after clicked

^C2021-10-17 18:48:30 INFO [Crawler.1198.stop] ctrl c interval = 0
2021-10-17 18:48:30 INFO [Crawler.917.saveLog] save log to 202110170000/elements.yml
2021-10-17 18:48:30 INFO [Report$.20.saveTestCase] save testcase
2021-10-17 18:48:30 INFO [Report$.28.$anonfun$saveTestCase$2] gen testcase class Steps
2021-10-17 18:48:30 ERROR [SuiteToClass$.43.genTestCaseClass] makeClass error with Steps
2021-10-17 18:48:30 INFO [Report$.28.$anonfun$saveTestCase$2] gen testcase class LoginActivity
2021-10-17 18:48:30 ERROR [SuiteToClass$.43.genTestCaseClass] makeClass error with LoginActivity
2021-10-17 18:48:30 INFO [Report$.28.$anonfun$saveTestCase$2] gen testcase class Launcher
2021-10-17 18:48:30 ERROR [SuiteToClass$.43.genTestCaseClass] makeClass error with Launcher
2021-10-17 18:48:30 INFO [Report$.64.runTestCase] run -R 202110170000/tmp/ -oF -u 202110170000 -h 202110170000
Discovery starting.
2021-10-17 18:48:30 INFO [Steps.30.initLog] already exist
2021-10-17 18:48:30 INFO [Steps.25.addTestCase] 1
2021-10-17 18:48:30 INFO [Steps.28.addTestCase] show all elements
2021-10-17 18:48:30 INFO [Steps.37.addTestCase] 1
2021-10-17 18:48:30 INFO [Launcher.30.initLog] already exist
2021-10-17 18:48:30 INFO [Launcher.25.addTestCase] 1
2021-10-17 18:48:30 INFO [Launcher.28.addTestCase] show all elements
2021-10-17 18:48:30 INFO [Launcher.37.addTestCase] 1
2021-10-17 18:48:30 INFO [LoginActivity.30.initLog] already exist
2021-10-17 18:48:30 INFO [LoginActivity.25.addTestCase] 2
2021-10-17 18:48:30 INFO [LoginActivity.28.addTestCase] show all elements
2021-10-17 18:48:30 INFO [LoginActivity.37.addTestCase] 2
Discovery completed in 7 milliseconds.
Run starting. Expected test count is: 4
Steps:

  • clickedIndex=1 action=Clicked
    xpath=//*[@resource-id=“com.hotbitmapgg.ohmybilibili:id/action_bar_root”]
    +



after clicked

^C2021-10-17 18:48:30 INFO [Crawler.1198.stop] ctrl c interval = 0
2021-10-17 18:48:30 INFO [Crawler.917.saveLog] save log to 202110170000/elements.yml
2021-10-17 18:48:30 INFO [Report$.20.saveTestCase] save testcase
2021-10-17 18:48:30 INFO [Report$.28.$anonfun$saveTestCase$2] gen testcase class Steps
2021-10-17 18:48:30 ERROR [SuiteToClass$.43.genTestCaseClass] makeClass error with Steps
2021-10-17 18:48:30 INFO [Report$.28.$anonfun$saveTestCase$2] gen testcase class LoginActivity
2021-10-17 18:48:30 ERROR [SuiteToClass$.43.genTestCaseClass] makeClass error with LoginActivity
2021-10-17 18:48:30 INFO [Report$.28.$anonfun$saveTestCase$2] gen testcase class Launcher
2021-10-17 18:48:30 ERROR [SuiteToClass$.43.genTestCaseClass] makeClass error with Launcher
2021-10-17 18:48:30 INFO [Report$.64.runTestCase] run -R 202110170000/tmp/ -oF -u 202110170000 -h 202110170000
Discovery starting.
2021-10-17 18:48:30 INFO [Steps.30.initLog] already exist
2021-10-17 18:48:30 INFO [Steps.25.addTestCase] 1
2021-10-17 18:48:30 INFO [Steps.28.addTestCase] show all elements
2021-10-17 18:48:30 INFO [Steps.37.addTestCase] 1
2021-10-17 18:48:30 INFO [Launcher.30.initLog] already exist
2021-10-17 18:48:30 INFO [Launcher.25.addTestCase] 1
2021-10-17 18:48:30 INFO [Launcher.28.addTestCase] show all elements
2021-10-17 18:48:30 INFO [Launcher.37.addTestCase] 1
2021-10-17 18:48:30 INFO [LoginActivity.30.initLog] already exist
2021-10-17 18:48:30 INFO [LoginActivity.25.addTestCase] 2
2021-10-17 18:48:30 INFO [LoginActivity.28.addTestCase] show all elements
2021-10-17 18:48:30 INFO [LoginActivity.37.addTestCase] 2
Discovery completed in 5 milliseconds.
Run starting. Expected test count is: 4
Steps:

  • clickedIndex=1 action=Clicked
    xpath=//*[@resource-id=“com.hotbitmapgg.ohmybilibili:id/action_bar_root”]
    +



after clicked

^C2021-10-17 18:48:30 INFO [Crawler.1198.stop] ctrl c interval = 0
2021-10-17 18:48:30 INFO [Crawler.917.saveLog] save log to 202110170000/elements.yml
2021-10-17 18:48:30 INFO [Report$.20.saveTestCase] save testcase
2021-10-17 18:48:30 INFO [Report$.28.$anonfun$saveTestCase$2] gen testcase class Steps
2021-10-17 18:48:30 ERROR [SuiteToClass$.43.genTestCaseClass] makeClass error with Steps
2021-10-17 18:48:30 INFO [Report$.28.$anonfun$saveTestCase$2] gen testcase class LoginActivity
2021-10-17 18:48:30 ERROR [SuiteToClass$.43.genTestCaseClass] makeClass error with LoginActivity
2021-10-17 18:48:30 INFO [Report$.28.$anonfun$saveTestCase$2] gen testcase class Launcher
2021-10-17 18:48:30 ERROR [SuiteToClass$.43.genTestCaseClass] makeClass error with Launcher
2021-10-17 18:48:30 INFO [Report$.64.runTestCase] run -R 202110170000/tmp/ -oF -u 202110170000 -h 202110170000
Discovery starting.
2021-10-17 18:48:30 INFO [Steps.30.initLog] already exist
2021-10-17 18:48:30 INFO [Steps.25.addTestCase] 1
2021-10-17 18:48:30 INFO [Steps.28.addTestCase] show all elements
2021-10-17 18:48:30 INFO [Steps.37.addTestCase] 1
2021-10-17 18:48:30 INFO [Launcher.30.initLog] already exist
2021-10-17 18:48:30 INFO [Launcher.25.addTestCase] 1
2021-10-17 18:48:30 INFO [Launcher.28.addTestCase] show all elements
2021-10-17 18:48:30 INFO [Launcher.37.addTestCase] 1
2021-10-17 18:48:30 INFO [LoginActivity.30.initLog] already exist
2021-10-17 18:48:30 INFO [LoginActivity.25.addTestCase] 2
2021-10-17 18:48:30 INFO [LoginActivity.28.addTestCase] show all elements
2021-10-17 18:48:30 INFO [LoginActivity.37.addTestCase] 2
Discovery completed in 6 milliseconds.
Run starting. Expected test count is: 4
Steps:

  • clickedIndex=1 action=Clicked
    xpath=//*[@resource-id=“com.hotbitmapgg.ohmybilibili:id/action_bar_root”]
    +



after clicked

^C2021-10-17 18:48:30 INFO [Crawler.1198.stop] ctrl c interval = 0
2021-10-17 18:48:30 INFO [Crawler.917.saveLog] save log to 202110170000/elements.yml
2021-10-17 18:48:30 INFO [Report$.20.saveTestCase] save testcase
2021-10-17 18:48:30 INFO [Report$.28.$anonfun$saveTestCase$2] gen testcase class Steps
2021-10-17 18:48:30 ERROR [SuiteToClass$.43.genTestCaseClass] makeClass error with Steps
2021-10-17 18:48:30 INFO [Report$.28.$anonfun$saveTestCase$2] gen testcase class LoginActivity
2021-10-17 18:48:30 ERROR [SuiteToClass$.43.genTestCaseClass] makeClass error with LoginActivity
2021-10-17 18:48:30 INFO [Report$.28.$anonfun$saveTestCase$2] gen testcase class Launcher
2021-10-17 18:48:30 ERROR [SuiteToClass$.43.genTestCaseClass] makeClass error with Launcher
2021-10-17 18:48:30 INFO [Report$.64.runTestCase] run -R 202110170000/tmp/ -oF -u 202110170000 -h 202110170000
Discovery starting.
2021-10-17 18:48:30 INFO [Steps.30.initLog] already exist
2021-10-17 18:48:30 INFO [Steps.25.addTestCase] 1
2021-10-17 18:48:30 INFO [Steps.28.addTestCase] show all elements
2021-10-17 18:48:30 INFO [Steps.37.addTestCase] 1
2021-10-17 18:48:30 INFO [Launcher.30.initLog] already exist
2021-10-17 18:48:30 INFO [Launcher.25.addTestCase] 1
2021-10-17 18:48:30 INFO [Launcher.28.addTestCase] show all elements
2021-10-17 18:48:30 INFO [Launcher.37.addTestCase] 1
2021-10-17 18:48:30 INFO [LoginActivity.30.initLog] already exist
2021-10-17 18:48:30 INFO [LoginActivity.25.addTestCase] 2
2021-10-17 18:48:30 INFO [LoginActivity.28.addTestCase] show all elements
2021-10-17 18:48:30 INFO [LoginActivity.37.addTestCase] 2
Discovery completed in 6 milliseconds.
Run starting. Expected test count is: 4
Steps:

  • clickedIndex=1 action=Clicked
    xpath=//*[@resource-id=“com.hotbitmapgg.ohmybilibili:id/action_bar_root”]
    +



after clicked

^C2021-10-17 18:48:30 INFO [Crawler.1198.stop] ctrl c interval = 0
2021-10-17 18:48:30 INFO [Crawler.917.saveLog] save log to 202110170000/elements.yml
2021-10-17 18:48:30 INFO [Report$.20.saveTestCase] save testcase
2021-10-17 18:48:30 INFO [Report$.28.$anonfun$saveTestCase$2] gen testcase class Steps
2021-10-17 18:48:30 ERROR [SuiteToClass$.43.genTestCaseClass] makeClass error with Steps
2021-10-17 18:48:30 INFO [Report$.28.$anonfun$saveTestCase$2] gen testcase class LoginActivity
2021-10-17 18:48:30 ERROR [SuiteToClass$.43.genTestCaseClass] makeClass error with LoginActivity
2021-10-17 18:48:30 INFO [Report$.28.$anonfun$saveTestCase$2] gen testcase class Launcher
2021-10-17 18:48:30 ERROR [SuiteToClass$.43.genTestCaseClass] makeClass error with Launcher
2021-10-17 18:48:30 INFO [Report$.64.runTestCase] run -R 202110170000/tmp/ -oF -u 202110170000 -h 202110170000
Discovery starting.
2021-10-17 18:48:30 INFO [Steps.30.initLog] already exist
2021-10-17 18:48:30 INFO [Steps.25.addTestCase] 1
2021-10-17 18:48:30 INFO [Steps.28.addTestCase] show all elements
2021-10-17 18:48:30 INFO [Steps.37.addTestCase] 1
2021-10-17 18:48:30 INFO [Launcher.30.initLog] already exist
2021-10-17 18:48:30 INFO [Launcher.25.addTestCase] 1
2021-10-17 18:48:30 INFO [Launcher.28.addTestCase] show all elements
2021-10-17 18:48:30 INFO [Launcher.37.addTestCase] 1
2021-10-17 18:48:30 INFO [LoginActivity.30.initLog] already exist
2021-10-17 18:48:30 INFO [LoginActivity.25.addTestCase] 2
2021-10-17 18:48:30 INFO [LoginActivity.28.addTestCase] show all elements
2021-10-17 18:48:30 INFO [LoginActivity.37.addTestCase] 2
Discovery completed in 6 milliseconds.
Run starting. Expected test count is: 4
Steps:

  • clickedIndex=1 action=Clicked
    xpath=//*[@resource-id=“com.hotbitmapgg.ohmybilibili:id/action_bar_root”]
    +



after clicked

2021-10-17 18:48:30 INFO [Crawler.977.saveScreen] screenshot success
2021-10-17 18:48:30 INFO [AppCrawler$.67.saveResHash] save resHash to 3
2021-10-17 18:48:30 INFO [AppCrawler$.101.saveResImg] save resImg 202110170000/3_Launcher.tag=TextView.depth=11.id=folder_icon_name.text=系统应用.clicked.png to 3
2021-10-17 18:48:30 INFO [AppCrawler$.84.saveResDom] save resDom to 3
2021-10-17 18:48:30 INFO [Crawler.709.afterElementAction] backRetry=0
2021-10-17 18:48:30 INFO [Crawler.712.afterElementAction] afterElementAction eval
2021-10-17 18:48:30 INFO [TagLimitPlugin.54.afterElementAction] tagLimit[Launcherhierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.view.ViewGroup/android.view.ViewGroup/android.view.ViewGroup/android.widget.LinearLayout/android.widget.TextView]=1
2021-10-17 18:48:30 INFO [ReportPlugin.36.afterElementAction] clickedElementsList size = 4
2021-10-17 18:48:30 INFO [Crawler.772.crawl]

crawl next
2021-10-17 18:48:30 INFO [Crawler.425.needReturn] urlStack=Stack(Launcher, LoginActivity) baseUrl=List() maxDepth=10
2021-10-17 18:48:30 INFO [Crawler.834.crawl] no need to back
2021-10-17 18:48:30 INFO [Crawler.487.getAvailableElement] selected nodes size = 17
2021-10-17 18:48:30 INFO [Crawler.499.getAvailableElement] all - black elements size = 17
2021-10-17 18:48:30 INFO [Crawler.528.getAvailableElement] all - first - last elements size = 17
2021-10-17 18:48:30 INFO [Crawler.590.getAvailableElement] all - backButton size=17
2021-10-17 18:48:30 INFO [Crawler.598.getAvailableElement] all - clicked size=16
2021-10-17 18:48:30 INFO [Crawler.605.getAvailableElement] all - skiped fresh elements size=16
2021-10-17 18:48:30 INFO [Crawler.843.crawl] found Launcher.tag=TextView.depth=11.id=folder_icon_name.text=小工具 by first available element
2021-10-17 18:48:30 INFO [Crawler.728.setElementAction] set action to click
2021-10-17 18:48:30 INFO [Crawler.996.doElementAction] current element = Launcher.tag=TextView.depth=11.id=folder_icon_name.text=小工具
2021-10-17 18:48:30 INFO [Crawler.997.doElementAction] current index = 4
2021-10-17 18:48:30 INFO [Crawler.998.doElementAction] current action = click
2021-10-17 18:48:30 INFO [Crawler.999.doElementAction] current xpath = //[@resource-id=“android:id/content”]//[@resource-id=“com.mumu.launcher:id/launcher”]//[@resource-id=“com.mumu.launcher:id/drag_layer”]//[@resource-id=“com.mumu.launcher:id/workspace”]//[@content-desc=“文件夹:小工具”]//[@text=“小工具” and @resource-id=“com.mumu.launcher:id/folder_icon_name”]
2021-10-17 18:48:30 INFO [Crawler.1000.doElementAction] current url = Launcher
2021-10-17 18:48:30 INFO [Crawler.1001.doElementAction] current tag path = hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.view.ViewGroup/android.view.ViewGroup/android.view.ViewGroup/android.widget.LinearLayout/android.widget.TextView
2021-10-17 18:48:30 INFO [Crawler.1002.doElementAction] current file name = Launcher.tag=TextView.depth=11.id=folder_icon_name.text=小工具
2021-10-17 18:48:30 INFO [AppCrawler$.59.saveReqHash] save reqHash to 4
2021-10-17 18:48:30 INFO [AppCrawler$.92.saveReqImg] save reqImg 202110170000/4_Launcher.tag=TextView.depth=11.id=folder_icon_name.text=小工具.click.png to 4
2021-10-17 18:48:30 INFO [AppCrawler$.76.saveReqDom] save reqDom to 4
2021-10-17 18:48:30 INFO [Crawler.1071.doElementAction] need input click
2021-10-17 18:48:30 INFO [AppiumClient.53.findElementByURI] find by uri element= Launcher.tag=TextView.depth=11.id=folder_icon_name.text=小工具
2021-10-17 18:48:30 INFO [AppiumClient.245.findElementsByURI] findElementByAndroidUIAutomator new UiSelector().className(“android.widget.TextView”).text(“小工具”).resourceId(“com.mumu.launcher:id/folder_icon_name”)
2021-10-17 18:48:31 INFO [AppiumClient.60.findElementByURI] find by xpath success
2021-10-17 18:48:31 INFO [Crawler.1080.doElementAction] mark 202110170000/3_Launcher.tag=TextView.depth=11.id=folder_icon_name.text=系统应用.clicked.png to 202110170000/4_Launcher.tag=TextView.depth=11.id=folder_icon_name.text=小工具.click.png
2021-10-17 18:48:31 INFO [AppiumClient.141.mark] read from 202110170000/3_Launcher.tag=TextView.depth=11.id=folder_icon_name.text=系统应用.clicked.png
2021-10-17 18:48:31 INFO [AppiumClient.146.mark] scale the origin image
2021-10-17 18:48:31 INFO [AppiumClient.154.mark] write png 202110170000/3_Launcher.tag=TextView.depth=11.id=folder_icon_name.text=系统应用.clicked.png
2021-10-17 18:48:31 INFO [AppiumClient.156.mark] scale the origin image and save
2021-10-17 18:48:31 ERROR [AppiumClient.237.asyncTask] exception
2021-10-17 18:48:31 ERROR [AppiumClient.238.asyncTask] java.awt.image.RasterFormatException: (y + height) is outside of Raster
2021-10-17 18:48:31 ERROR [AppiumClient.239.asyncTask] java.util.concurrent.FutureTask.report(FutureTask.java:122)
java.util.concurrent.FutureTask.get(FutureTask.java:206)
com.testerhome.appcrawler.driver.ReactWebDriver.$anonfun$asyncTask$1(ReactWebDriver.scala:223)
scala.util.Try$.apply(Try.scala:209)
com.testerhome.appcrawler.driver.ReactWebDriver.asyncTask(ReactWebDriver.scala:214)
com.testerhome.appcrawler.driver.ReactWebDriver.asyncTask$(ReactWebDriver.scala:212)
com.testerhome.appcrawler.driver.AppiumClient.asyncTask(AppiumClient.scala:28)
com.testerhome.appcrawler.Crawler.doElementAction(Crawler.scala:1082)
com.testerhome.appcrawler.Crawler.crawl(Crawler.scala:898)
com.testerhome.appcrawler.Crawler.$anonfun$crawl$1(Crawler.scala:187)
scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
scala.util.Try$.apply(Try.scala:209)
com.testerhome.appcrawler.Crawler.crawl(Crawler.scala:187)
com.testerhome.appcrawler.Crawler.start(Crawler.scala:170)
com.testerhome.appcrawler.AppCrawler$.startCrawl(AppCrawler.scala:322)
com.testerhome.appcrawler.AppCrawler$.parseParams(AppCrawler.scala:290)
com.testerhome.appcrawler.AppCrawler$.main(AppCrawler.scala:91)
com.testerhome.appcrawler.AppCrawler.main(AppCrawler.scala)
2021-10-17 18:48:31 INFO [Crawler.1095.$anonfun$doElementAction$5] click element
2021-10-17 18:48:31 INFO [AppiumClient.174.click] [[io.appium.java_client.android.AndroidDriver, Capabilities: {app=, appActivity=com.hotbitmapgg.bilibili.module.common.LoginActivity, appPackage=com.hotbitmapgg.ohmybilibili, appium=http://127.0.0.1:4723/wd/hub, databaseEnabled=false, desired={platformName=android, appium=http://127.0.0.1:4723/wd/hub, app=, appActivity=com.hotbitmapgg.bilibili.module.common.LoginActivity, appPackage=com.hotbitmapgg.ohmybilibili, deviceName=demo, fullReset=false, noReset=true}, deviceApiLevel=23, deviceManufacturer=Netease, deviceModel=MuMu, deviceName=emulator-5554, deviceScreenDensity=416, deviceScreenSize=1170x1872, deviceUDID=emulator-5554, fullReset=false, javascriptEnabled=true, locationContextEnabled=false, networkConnectionEnabled=true, noReset=true, pixelRatio=2.6000001, platform=LINUX, platformName=Android, platformVersion=6.0.1, statBarHeight=62, takesScreenshot=true, viewportRect={left=0, top=62, width=1170, height=1810}, warnings={}, webStorageEnabled=false}] → -android uiautomator: new UiSelector().className(“android.widget.TextView”).text(“小工具”).resourceId(“com.mumu.launcher:id/folder_icon_name”)]
^C2021-10-17 18:48:31 INFO [Crawler.1198.stop] ctrl c interval = 0
2021-10-17 18:48:31 INFO [Crawler.917.saveLog] save log to 202110170000/elements.yml
2021-10-17 18:48:31 INFO [Report$.20.saveTestCase] save testcase
2021-10-17 18:48:31 INFO [Report$.28.$anonfun$saveTestCase$2] gen testcase class Launcher
2021-10-17 18:48:31 ERROR [SuiteToClass$.43.genTestCaseClass] makeClass error with Launcher
2021-10-17 18:48:31 INFO [Report$.28.$anonfun$saveTestCase$2] gen testcase class Steps
2021-10-17 18:48:31 ERROR [SuiteToClass$.43.genTestCaseClass] makeClass error with Steps
2021-10-17 18:48:31 INFO [Report$.28.$anonfun$saveTestCase$2] gen testcase class LoginActivity
2021-10-17 18:48:31 ERROR [SuiteToClass$.43.genTestCaseClass] makeClass error with LoginActivity
2021-10-17 18:48:31 INFO [Report$.64.runTestCase] run -R 202110170000/tmp/ -oF -u 202110170000 -h 202110170000
Discovery starting.
2021-10-17 18:48:31 INFO [Steps.30.initLog] already exist
2021-10-17 18:48:31 INFO [Steps.25.addTestCase] 1
2021-10-17 18:48:31 INFO [Steps.28.addTestCase] show all elements
2021-10-17 18:48:31 INFO [Steps.37.addTestCase] 1
2021-10-17 18:48:31 INFO [Launcher.30.initLog] already exist
2021-10-17 18:48:31 INFO [Launcher.25.addTestCase] 2
2021-10-17 18:48:31 INFO [Launcher.28.addTestCase] show all elements
2021-10-17 18:48:31 INFO [Launcher.37.addTestCase] 2
2021-10-17 18:48:31 INFO [LoginActivity.30.initLog] already exist
2021-10-17 18:48:31 INFO [LoginActivity.25.addTestCase] 2
2021-10-17 18:48:31 INFO [LoginActivity.28.addTestCase] show all elements
2021-10-17 18:48:31 INFO [LoginActivity.37.addTestCase] 2
Discovery completed in 5 milliseconds.
Run starting. Expected test count is: 5
Steps:

  • clickedIndex=1 action=Clicked
    xpath=//*[@resource-id=“com.hotbitmapgg.ohmybilibili:id/action_bar_root”]
    +



after clicked

^C2021-10-17 18:48:31 INFO [Crawler.1198.stop] ctrl c interval = 0
2021-10-17 18:48:31 INFO [Crawler.917.saveLog] save log to 202110170000/elements.yml
2021-10-17 18:48:31 INFO [Report$.20.saveTestCase] save testcase
2021-10-17 18:48:31 INFO [Report$.28.$anonfun$saveTestCase$2] gen testcase class Launcher
2021-10-17 18:48:31 ERROR [SuiteToClass$.43.genTestCaseClass] makeClass error with Launcher
2021-10-17 18:48:31 INFO [Report$.28.$anonfun$saveTestCase$2] gen testcase class Steps
2021-10-17 18:48:31 ERROR [SuiteToClass$.43.genTestCaseClass] makeClass error with Steps
2021-10-17 18:48:31 INFO [Report$.28.$anonfun$saveTestCase$2] gen testcase class LoginActivity
2021-10-17 18:48:31 ERROR [SuiteToClass$.43.genTestCaseClass] makeClass error with LoginActivity
2021-10-17 18:48:31 INFO [Report$.64.runTestCase] run -R 202110170000/tmp/ -oF -u 202110170000 -h 202110170000
Discovery starting.
2021-10-17 18:48:31 INFO [Steps.30.initLog] already exist
2021-10-17 18:48:31 INFO [Steps.25.addTestCase] 1
2021-10-17 18:48:31 INFO [Steps.28.addTestCase] show all elements
2021-10-17 18:48:31 INFO [Steps.37.addTestCase] 1
2021-10-17 18:48:31 INFO [Launcher.30.initLog] already exist
2021-10-17 18:48:31 INFO [Launcher.25.addTestCase] 2
2021-10-17 18:48:31 INFO [Launcher.28.addTestCase] show all elements
2021-10-17 18:48:31 INFO [Launcher.37.addTestCase] 2
2021-10-17 18:48:31 INFO [LoginActivity.30.initLog] already exist
2021-10-17 18:48:31 INFO [LoginActivity.25.addTestCase] 2
2021-10-17 18:48:31 INFO [LoginActivity.28.addTestCase] show all elements
2021-10-17 18:48:31 INFO [LoginActivity.37.addTestCase] 2
Discovery completed in 4 milliseconds.
Run starting. Expected test count is: 5
Steps:

  • clickedIndex=1 action=Clicked
    xpath=//*[@resource-id=“com.hotbitmapgg.ohmybilibili:id/action_bar_root”]
    +



after clicked

^C2021-10-17 18:48:31 INFO [Crawler.1198.stop] ctrl c interval = 0
2021-10-17 18:48:31 INFO [Crawler.917.saveLog] save log to 202110170000/elements.yml
2021-10-17 18:48:31 INFO [Report$.20.saveTestCase] save testcase
2021-10-17 18:48:31 INFO [Report$.28.$anonfun$saveTestCase$2] gen testcase class Launcher
2021-10-17 18:48:31 ERROR [SuiteToClass$.43.genTestCaseClass] makeClass error with Launcher
2021-10-17 18:48:31 INFO [Report$.28.$anonfun$saveTestCase$2] gen testcase class Steps
2021-10-17 18:48:31 ERROR [SuiteToClass$.43.genTestCaseClass] makeClass error with Steps
2021-10-17 18:48:31 INFO [Report$.28.$anonfun$saveTestCase$2] gen testcase class LoginActivity
2021-10-17 18:48:31 ERROR [SuiteToClass$.43.genTestCaseClass] makeClass error with LoginActivity
2021-10-17 18:48:31 INFO [Report$.64.runTestCase] run -R 202110170000/tmp/ -oF -u 202110170000 -h 202110170000
Discovery starting.
2021-10-17 18:48:31 INFO [Steps.30.initLog] already exist
2021-10-17 18:48:31 INFO [Steps.25.addTestCase] 1
2021-10-17 18:48:31 INFO [Steps.28.addTestCase] show all elements
2021-10-17 18:48:31 INFO [Steps.37.addTestCase] 1
2021-10-17 18:48:31 INFO [Launcher.30.initLog] already exist
2021-10-17 18:48:31 INFO [Launcher.25.addTestCase] 2
2021-10-17 18:48:31 INFO [Launcher.28.addTestCase] show all elements
2021-10-17 18:48:31 INFO [Launcher.37.addTestCase] 2
2021-10-17 18:48:31 INFO [LoginActivity.30.initLog] already exist
2021-10-17 18:48:31 INFO [LoginActivity.25.addTestCase] 2
2021-10-17 18:48:31 INFO [LoginActivity.28.addTestCase] show all elements
2021-10-17 18:48:31 INFO [LoginActivity.37.addTestCase] 2
Discovery completed in 4 milliseconds.
Run starting. Expected test count is: 5
Steps:

  • clickedIndex=1 action=Clicked
    xpath=//*[@resource-id=“com.hotbitmapgg.ohmybilibili:id/action_bar_root”]
    +



after clicked

^C2021-10-17 18:48:32 INFO [Crawler.1198.stop] ctrl c interval = 0
2021-10-17 18:48:32 INFO [Crawler.917.saveLog] save log to 202110170000/elements.yml
2021-10-17 18:48:32 INFO [Report$.20.saveTestCase] save testcase
2021-10-17 18:48:32 INFO [Report$.28.$anonfun$saveTestCase$2] gen testcase class Launcher
2021-10-17 18:48:32 ERROR [SuiteToClass$.43.genTestCaseClass] makeClass error with Launcher
2021-10-17 18:48:32 INFO [Report$.28.$anonfun$saveTestCase$2] gen testcase class Steps
2021-10-17 18:48:32 ERROR [SuiteToClass$.43.genTestCaseClass] makeClass error with Steps
2021-10-17 18:48:32 INFO [Report$.28.$anonfun$saveTestCase$2] gen testcase class LoginActivity
2021-10-17 18:48:32 ERROR [SuiteToClass$.43.genTestCaseClass] makeClass error with LoginActivity
2021-10-17 18:48:32 INFO [Report$.64.runTestCase] run -R 202110170000/tmp/ -oF -u 202110170000 -h 202110170000
Discovery starting.
2021-10-17 18:48:32 INFO [Steps.30.initLog] already exist
2021-10-17 18:48:32 INFO [Steps.25.addTestCase] 1
2021-10-17 18:48:32 INFO [Steps.28.addTestCase] show all elements
2021-10-17 18:48:32 INFO [Steps.37.addTestCase] 1
2021-10-17 18:48:32 INFO [Launcher.30.initLog] already exist
2021-10-17 18:48:32 INFO [Launcher.25.addTestCase] 2
2021-10-17 18:48:32 INFO [Launcher.28.addTestCase] show all elements
2021-10-17 18:48:32 INFO [Launcher.37.addTestCase] 2
2021-10-17 18:48:32 INFO [LoginActivity.30.initLog] already exist
2021-10-17 18:48:32 INFO [LoginActivity.25.addTestCase] 2
2021-10-17 18:48:32 INFO [LoginActivity.28.addTestCase] show all elements
2021-10-17 18:48:32 INFO [LoginActivity.37.addTestCase] 2
Discovery completed in 6 milliseconds.
Run starting. Expected test count is: 5
Steps:

  • clickedIndex=1 action=Clicked
    xpath=//*[@resource-id=“com.hotbitmapgg.ohmybilibili:id/action_bar_root”]
    +



after clicked

^C2021-10-17 18:48:32 INFO [Crawler.1198.stop] ctrl c interval = 0
2021-10-17 18:48:32 INFO [Crawler.917.saveLog] save log to 202110170000/elements.yml
2021-10-17 18:48:32 INFO [Report$.20.saveTestCase] save testcase
2021-10-17 18:48:32 INFO [Report$.28.$anonfun$saveTestCase$2] gen testcase class Launcher
2021-10-17 18:48:32 ERROR [SuiteToClass$.43.genTestCaseClass] makeClass error with Launcher
2021-10-17 18:48:32 INFO [Report$.28.$anonfun$saveTestCase$2] gen testcase class Steps
2021-10-17 18:48:32 ERROR [SuiteToClass$.43.genTestCaseClass] makeClass error with Steps
2021-10-17 18:48:32 INFO [Report$.28.$anonfun$saveTestCase$2] gen testcase class LoginActivity
2021-10-17 18:48:32 ERROR [SuiteToClass$.43.genTestCaseClass] makeClass error with LoginActivity
2021-10-17 18:48:32 INFO [Report$.64.runTestCase] run -R 202110170000/tmp/ -oF -u 202110170000 -h 202110170000
Discovery starting.
2021-10-17 18:48:32 INFO [Steps.30.initLog] already exist
2021-10-17 18:48:32 INFO [Steps.25.addTestCase] 1
2021-10-17 18:48:32 INFO [Steps.28.addTestCase] show all elements
2021-10-17 18:48:32 INFO [Steps.37.addTestCase] 1
2021-10-17 18:48:32 INFO [Launcher.30.initLog] already exist
2021-10-17 18:48:32 INFO [Launcher.25.addTestCase] 2
2021-10-17 18:48:32 INFO [Launcher.28.addTestCase] show all elements
2021-10-17 18:48:32 INFO [Launcher.37.addTestCase] 2
2021-10-17 18:48:32 INFO [LoginActivity.30.initLog] already exist
2021-10-17 18:48:32 INFO [LoginActivity.25.addTestCase] 2
2021-10-17 18:48:32 INFO [LoginActivity.28.addTestCase] show all elements
2021-10-17 18:48:32 INFO [LoginActivity.37.addTestCase] 2
Discovery completed in 6 milliseconds.
Run starting. Expected test count is: 5
Steps:

  • clickedIndex=1 action=Clicked
    xpath=//*[@resource-id=“com.hotbitmapgg.ohmybilibili:id/action_bar_root”]
    +



after clicked

Launcher:

  • clickedIndex=3 action=Clicked
    xpath=//[@resource-id=“android:id/content”]//[@resource-id=“com.mumu.launcher:id/launcher”]//[@resource-id=“com.mumu.launcher:id/drag_layer”]//[@resource-id=“com.mumu.launcher:id/workspace”]//[@content-desc=“文件夹:系统应用”]//[@text=“系统应用” and @resource-id=“com.mumu.launcher:id/folder_icon_name”]
    +



after clicked

LoginActivity:

  • clickedIndex=0 action=Clicked
    xpath=Start-Start-0
    +



after clicked

  • clickedIndex=2 action=Clicked
    xpath=//[@resource-id=“com.hotbitmapgg.ohmybilibili:id/action_bar_root”]//[@resource-id=“android:id/content”]//*[@resource-id=“com.hotbitmapgg.ohmybilibili:id/toolbar”]
    +



after clicked

Run completed in 35 milliseconds.
Total number of tests run: 4
Suites: completed 4, aborted 0
Tests: succeeded 4, failed 0, canceled 0, ignored 0, pending 0
All tests passed.
2021-10-17 18:48:32 INFO [FreeMind.17.stop] genereate freemind file freemind.mm
2021-10-17 18:48:32 INFO [Crawler.1207.stop] generate report finish
Derrick:appcrawler hupo$

完整的配置yaml也发一下吧 可以直接发文件 或者使用代码模式来发 不要直接粘贴进来 格式会错乱 不方便后续操作

Appcrawler.log (54.3 KB)
bilili.yml.txt (2.1 KB)

下周有遍历的进阶课 可以去听听。我觉得可能是跟app的界面结构有关。默认找的遍历范围selectedlist里没有他的空间。比如有些app用web设计的,解析出来的类型是view类型 而不是普通的textview edittext button之类的。你可以用inspector工具看看

嗯好的,谢谢老师

老师,请问这个进阶课怎么加入?

关注公众号通知 你估计也在微信群里吧 我下周会讲进阶

关闭