你好 --list-devices block 的问题 解决了吗 也没有日志 完全不知道怎么办
谢谢你的解答!
之前的问题是解决了, 执行一段时间后报了新的错误
日志里有生成 132_com.greenline.guahao-HomeActivity_android.view.View-android.widget.ListView-android.view.View-javascript 这个文件,但是空的
2017-06-21 13:59:38 INFO [AppiumClient.mark.237] read from Android_20170621135043/132_com.greenline.guahao-HomeActivity_android.view.View-android.widget.ListView-android.view.View-javascript:;-android.view.View.clicked.png
2017-06-21 13:59:38 ERROR [Crawler.crawl.196] crawl not finish, return with exception
2017-06-21 13:59:38 ERROR [Crawler.crawl.197] Can't read input file!
2017-06-21 13:59:38 ERROR [Crawler.crawl.198] IIOException: Can't read input file!
2017-06-21 13:59:38 ERROR [Crawler.crawl.199]
2017-06-21 13:59:38 ERROR [Crawler.apply.200] javax.imageio.IIOException: Can't read input file!
2017-06-21 13:59:38 ERROR [Crawler.apply.200] at javax.imageio.ImageIO.read(Unknown Source)
2017-06-21 13:59:38 ERROR [Crawler.apply.200] at com.testerhome.appcrawler.driver.AppiumClient.mark(AppiumClient.scala:238)
2017-06-21 13:59:38 ERROR [Crawler.apply.200] at com.testerhome.appcrawler.Crawler.doElementAction(Crawler.scala:992)
2017-06-21 13:59:38 ERROR [Crawler.apply.200] at com.testerhome.appcrawler.Crawler.crawl(Crawler.scala:797)
2017-06-21 13:59:38 ERROR [Crawler.apply.200] at com.testerhome.appcrawler.Crawler$$anonfun$1.apply$mcV$sp(Crawler.scala:173)
2017-06-21 13:59:38 ERROR [Crawler.apply.200] at com.testerhome.appcrawler.Crawler$$anonfun$1.apply(Crawler.scala:173)
2017-06-21 13:59:38 ERROR [Crawler.apply.200] at com.testerhome.appcrawler.Crawler$$anonfun$1.apply(Crawler.scala:173)
2017-06-21 13:59:38 ERROR [Crawler.apply.200] at scala.util.Try$.apply(Try.scala:192)
2017-06-21 13:59:38 ERROR [Crawler.apply.200] at com.testerhome.appcrawler.Crawler.crawl(Crawler.scala:173)
2017-06-21 13:59:38 ERROR [Crawler.apply.200] at com.testerhome.appcrawler.Crawler.start(Crawler.scala:157)
2017-06-21 13:59:38 ERROR [Crawler.apply.200] at com.testerhome.appcrawler.AppCrawler$.startCrawl(AppCrawler.scala:342)
2017-06-21 13:59:38 ERROR [Crawler.apply.200] at com.testerhome.appcrawler.AppCrawler$.parseParams(AppCrawler.scala:310)
2017-06-21 13:59:38 ERROR [Crawler.apply.200] at com.testerhome.appcrawler.AppCrawler$.main(AppCrawler.scala:90)
2017-06-21 13:59:38 ERROR [Crawler.apply.200] at com.testerhome.appcrawler.AppCrawler.main(AppCrawler.scala)
2017-06-21 13:59:38 ERROR [Crawler.crawl.201] create new session
2017-06-21 13:59:38 INFO [Crawler.restart.216] restart appium
2017-06-21 13:59:38 INFO [Crawler.restart.218] set app to null to restart appium
2017-06-21 13:59:38 INFO [Crawler.setupAppium.253] use AppiumClient
Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: A new session could not be created. (Original error: Requested a new session but one was in progress) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 748 milliseconds
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: host: 'LAPTOP-38CHF3G1', ip: '192.168.118.213', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_91'
Driver info: io.appium.java_client.android.AndroidDriver
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:678)
at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:40)
at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
at io.appium.java_client.android.AndroidDriver.execute(AndroidDriver.java:1)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:249)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:131)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:144)
at io.appium.java_client.DefaultGenericMobileDriver.(DefaultGenericMobileDriver.java:36)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:114)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:132)
at io.appium.java_client.android.AndroidDriver.(AndroidDriver.java:92)
at com.testerhome.appcrawler.driver.AppiumClient.appium(AppiumClient.scala:160)
at com.testerhome.appcrawler.driver.AppiumClient.(AppiumClient.scala:38)
at com.testerhome.appcrawler.Crawler.setupAppium(Crawler.scala:254)
at com.testerhome.appcrawler.Crawler.restart(Crawler.scala:220)
at com.testerhome.appcrawler.Crawler.crawl(Crawler.scala:204)
at com.testerhome.appcrawler.Crawler.start(Crawler.scala:157)
at com.testerhome.appcrawler.AppCrawler$.startCrawl(AppCrawler.scala:342)
at com.testerhome.appcrawler.AppCrawler$.parseParams(AppCrawler.scala:310)
at com.testerhome.appcrawler.AppCrawler$.main(AppCrawler.scala:90)
at com.testerhome.appcrawler.AppCrawler.main(AppCrawler.scala)
还没有
@seveniruby 你好 我使用 2.0.1 的 jar java -jar appcrawler-2.0.1.jar -c 123.yml -a guahao.apk 遇到下面错误 应该解决?
2017-06-06 15:51:47 ERROR [AppiumClient.asyncTask.149] exception
2017-06-06 15:51:47 ERROR [AppiumClient.asyncTask.150] org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 71 milliseconds
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: host: 'LAPTOP-38CHF3G1', ip: '192.168.118.213', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_91'
Driver info: io.appium.java_client.android.AndroidDriver
Capabilities [{appPackage=com.greenline.guahao, reuse=3, noReset=true, dontStopAppOnReset=true, deviceName=c1661029, platform=LINUX, androidInstallTimeout=180000, desired={app=D:\WorkSpace\appcrawler\appcrawler-1.7.1\bin\guahao.apk, appPackage=com.greenline.guahao, reuse=3, appium=http://127.0.0.1:4723/wd/hub, noReset=true, dontStopAppOnReset=true, deviceName=192.168.0.102:5555, launchTimeout=120000, appActivity=.home.HomeActivity, androidInstallTimeout=180000, newCommandTimeout=120, autoLaunch=true, platformVersion=, automationName=uiautomator2, autoWebview=false, platformName=Android}, newCommandTimeout=120, platformVersion=5.0.2, webStorageEnabled=false, automationName=uiautomator2, browserName=Android, takesScreenshot=true, javascriptEnabled=true, autoWebview=false, platformName=Android, app=D:\WorkSpace\appcrawler\appcrawler-1.7.1\bin\guahao.apk, networkConnectionEnabled=true, appium=http://127.0.0.1:4723/wd/hub, warnings={}, databaseEnabled=false, launchTimeout=120000, appActivity=.home.HomeActivity, autoLaunch=true, locationContextEnabled=false}]
Session ID: 01e3d0b8-e106-4edc-bb91-7a8d7c8366d8
2017-06-06 15:51:47 ERROR [AppiumClient.asyncTask.151] java.util.concurrent.FutureTask.report(Unknown Source)
java.util.concurrent.FutureTask.get(Unknown Source)
com.xueqiu.qa.appcrawler.WebDriver$$anonfun$2.apply(WebDriver.scala:134)
scala.util.Try$.apply(Try.scala:192)
com.xueqiu.qa.appcrawler.WebDriver$class.asyncTask(WebDriver.scala:125)
com.xueqiu.qa.appcrawler.AppiumClient.asyncTask(AppiumClient.scala:28)
com.xueqiu.qa.appcrawler.AppiumClient$$anonfun$getPageSource$1.apply$mcVI$sp(AppiumClient.scala:307)
scala.collection.immutable.Range.foreach$mVc$sp(Range.scala:166)
com.xueqiu.qa.appcrawler.AppiumClient.getPageSource(AppiumClient.scala:306)
com.xueqiu.qa.appcrawler.Crawler.refreshPage(Crawler.scala:525)
com.xueqiu.qa.appcrawler.Crawler.runStartupScript(Crawler.scala:205)
com.xueqiu.qa.appcrawler.Crawler.start(Crawler.scala:139)
com.xueqiu.qa.appcrawler.AppCrawler$.startCrawl(AppCrawler.scala:313)
com.xueqiu.qa.appcrawler.AppCrawler$.main(AppCrawler.scala:303)
com.xueqiu.qa.appcrawler.AppCrawler.main(AppCrawler.scala)
Exception in thread "main" java.lang.NullPointerException
at scala.collection.immutable.StringOps$.length$extension(StringOps.scala:48)
at scala.collection.immutable.StringOps.length(StringOps.scala:48)
at scala.collection.IndexedSeqOptimized$class.isEmpty(IndexedSeqOptimized.scala:27)
at scala.collection.immutable.StringOps.isEmpty(StringOps.scala:30)
at scala.collection.TraversableOnce$class.nonEmpty(TraversableOnce.scala:109)
at scala.collection.immutable.StringOps.nonEmpty(StringOps.scala:30)
at com.xueqiu.qa.appcrawler.Crawler.refreshPage(Crawler.scala:528)
at com.xueqiu.qa.appcrawler.Crawler.runStartupScript(Crawler.scala:205)
at com.xueqiu.qa.appcrawler.Crawler.start(Crawler.scala:139)
at com.xueqiu.qa.appcrawler.AppCrawler$.startCrawl(AppCrawler.scala:313)
at com.xueqiu.qa.appcrawler.AppCrawler$.main(AppCrawler.scala:303)
at com.xueqiu.qa.appcrawler.AppCrawler.main(AppCrawler.scala)