测试人社区

appcrawler运行报错

试下appcrawler,根据参考文档中的命令,启动遍历一个已经安装过的APP(以示例中的雪球App为例):
java -jar appcrawler-2.4.0-jar-with-dependencies.jar --capability “appPackage=com.xueqiu.android,appActivity=.view.WelcomeActivityAlias”
这个命令执行后可以成功启动雪球APP,但是出现报错无法继续执行
log信息:
2020-11-13 11:29:05 INFO [Crawler.130.start] set xpath attribute with List(name, label, value, resource-id, content-desc, instance, text)
2020-11-13 11:29:05 INFO [Crawler.135.start] set xpath
2020-11-13 11:29:05 INFO [Crawler.89.$anonfun$loadPlugins$2] com.testerhome.appcrawler.plugin.TagLimitPlugin@245ec1a6
2020-11-13 11:29:05 INFO [Crawler.89.$anonfun$loadPlugins$2] com.testerhome.appcrawler.plugin.ReportPlugin@782be4eb
2020-11-13 11:29:05 INFO [Crawler.89.$anonfun$loadPlugins$2] com.testerhome.appcrawler.plugin.FreeMind@38792286
2020-11-13 11:29:05 INFO [TagLimitPlugin.19.init] com.testerhome.appcrawler.plugin.TagLimitPlugin init
2020-11-13 11:29:05 INFO [ReportPlugin.19.init] com.testerhome.appcrawler.plugin.ReportPlugin init
2020-11-13 11:29:05 INFO [FreeMind.19.init] com.testerhome.appcrawler.plugin.FreeMind init
2020-11-13 11:29:05 INFO [ReportPlugin.21.start] reportPath=D:\Program Files\appcrawler\20201113112903
2020-11-13 11:29:05 INFO [ReportPlugin.24.start] create D:\Program Files\appcrawler\20201113112903/tmp/ directory
2020-11-13 11:29:05 INFO [Crawler.138.start] prepare setup Appium
2020-11-13 11:29:05 INFO [Crawler.250.setupAppium] afterPageMax=2
2020-11-13 11:29:07 INFO [Crawler.273.setupAppium] use AppiumClient
2020-11-13 11:29:07 INFO [Crawler.274.setupAppium] Map(appActivity -> .view.WelcomeActivityAlias, appium -> http://127.0.0.1:4723/wd/hub, noReset -> true, appPackage -> com.xueqiu.android, fullReset -> false)
2020-11-13 11:29:18 INFO [AppiumClient.120.getDeviceInfo] screenWidth=1080 screenHeight=2115
2020-11-13 11:29:18 INFO [AppiumClient.112.appium] capture dir = D:\Program Files\appcrawler.
2020-11-13 11:29:18 INFO [Crawler.278.setupAppium] com.testerhome.appcrawler.driver.AppiumClient@24fba488
2020-11-13 11:29:18 INFO [Crawler.145.start] platformName= driver=com.testerhome.appcrawler.driver.AppiumClient@24fba488
2020-11-13 11:29:18 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 沐木


2020-11-13 11:29:18 INFO [Crawler.147.start] waiting for app load
2020-11-13 11:29:24 INFO [Crawler.149.start] driver=null
2020-11-13 11:29:24 INFO [Crawler.150.start] get screen info
2020-11-13 11:29:24 INFO [AppiumClient.120.getDeviceInfo] screenWidth=1080 screenHeight=2115
2020-11-13 11:29:24 INFO [Crawler.627.refreshPage] refresh page
2020-11-13 11:29:24 INFO [AppiumClient.102.getPageSourceWithRetry] start to get page source from appium
2020-11-13 11:29:24 INFO [AppiumClient.117.$anonfun$getPageSourceWithRetry$1] xml format

用java8跑把,你用的是java11? 应该是这个包在java的高版本上被移除了。

我之前用java 1.15跑的,也存在这个问题,改成java 1.8版本的,就OK了。多谢思寒大大

安装回1.8版本,可以成功运行