• 我这不是mac,在intelliIDEA上弄好scala环境,导入appcrawler功能,总是报错。各位是怎么解决的?

    [info] Reapplying settings...
    [info] Set current project to AppCrawler (in build file:/Users/dengwei/Documents/amap-client/crawler/AppCrawler/AppCrawler/)
    [info] Applying State transformations org.jetbrains.sbt.CreateTasks from /Users/dengwei/Library/Application Support/IntelliJIdea2016.2/Scala/launcher/sbt-structure-1.0.jar
    [error] java.lang.ClassNotFoundException: org.jetbrains.sbt.CreateTasks$
    [error]         at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    [error]         at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    [error]         at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    [error]         at java.lang.Class.forName0(Native Method)
    [error]         at java.lang.Class.forName(Class.java:348)
    [error]         at sbt.internal.inc.ModuleUtilities$.getObject(ModuleUtilities.scala:20)
    [error]         at sbt.BasicCommands$.$anonfun$call$5(BasicCommands.scala:187)
    [error]         at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:234)
    [error]         at scala.collection.immutable.List.foreach(List.scala:389)
    [error]         at scala.collection.TraversableLike.map(TraversableLike.scala:234)
    [error]         at scala.collection.TraversableLike.map$(TraversableLike.scala:227)
    [error]         at scala.collection.immutable.List.map(List.scala:295)
    [error]         at sbt.BasicCommands$.$anonfun$call$2(BasicCommands.scala:187)
    [error]         at sbt.Command$.$anonfun$applyEffect$4(Command.scala:125)
    [error]         at sbt.Command$.$anonfun$applyEffect$2(Command.scala:121)
    [error]         at sbt.MainLoop$.processCommand(MainLoop.scala:121)
    [error]         at sbt.MainLoop$.$anonfun$next$2(MainLoop.scala:105)
    [error]         at sbt.State$$anon$1.runCmd$1(State.scala:227)
    [error]         at sbt.State$$anon$1.process(State.scala:233)
    [error]         at sbt.MainLoop$.$anonfun$next$1(MainLoop.scala:105)
    [error]         at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16)
    [error]         at sbt.MainLoop$.next(MainLoop.scala:105)
    [error]         at sbt.MainLoop$.run(MainLoop.scala:98)
    [error]         at sbt.MainLoop$.$anonfun$runWithNewLog$1(MainLoop.scala:76)
    [error]         at sbt.io.Using.apply(Using.scala:22)
    [error]         at sbt.MainLoop$.runWithNewLog(MainLoop.scala:70)
    [error]         at sbt.MainLoop$.runAndClearLast(MainLoop.scala:52)
    [error]         at sbt.MainLoop$.runLoggedLoop(MainLoop.scala:37)
    [error]         at sbt.MainLoop$.runLogged(MainLoop.scala:29)
    [error]         at sbt.StandardMain$.runManaged(Main.scala:104)
    [error]         at sbt.xMain.run(Main.scala:71)
    [error]         at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:109)
    
  • @seveniruby 发现一个bug,backButton在ios上始终不生效。
    该问题block我们后续调研啦,辛苦优先修复一下哈

    看代码发现,(设置ElementAction时机应该提前吧)

    • backButton 设置始终不生效,有bug: //判断是否需要返回上层 if (nextElement == None) { if (needReturn()) { log.info("need to back") nextElement = getBackButton() setElementAction("back") } else { log.info("no need to back") } }

    back方法:

    
    def back(): Unit = {
      pluginClasses.foreach(_.beforeBack())
      if (conf.currentDriver.toLowerCase == "android") {
        if (backDistance.intervalMS() < 4000) {
          log.warn("two back action too close")
          Thread.sleep(4000)
        }
        driver.asyncTask() {
          driver.back()
        }
        backDistance.append("back")
        appNameRecord.pop()
      } else {
        log.warn("you should define you back button in the conf file")
      }
    }
    
  • @seveniruby 提个bug

    2017-10-19 17:58:53 WARN [AppiumClient.$anonfun$getPageSource$1.335] get page source error
    2017-10-19 17:59:13 ERROR [AppiumClient.asyncTask.149] 20 seconds timeout
    2017-10-19 17:59:13 WARN [AppiumClient.$anonfun$getPageSource$1.335] get page source error
    2017-10-19 17:59:13 ERROR [Crawler.crawl.196] crawl not finish, return with exception
    2017-10-19 17:59:13 ERROR [Crawler.crawl.197]
    2017-10-19 17:59:13 ERROR [Crawler.crawl.198] NullPointerException:
    2017-10-19 17:59:13 ERROR [Crawler.crawl.199]
    2017-10-19 17:59:13 ERROR [Crawler.$anonfun$crawl$4.200] java.lang.NullPointerException
    2017-10-19 17:59:13 ERROR [Crawler.$anonfun$crawl$4.200]    at scala.collection.immutable.StringOps$.length$extension(StringOps.scala:47)
    2017-10-19 17:59:13 ERROR [Crawler.$anonfun$crawl$4.200]    at scala.collection.immutable.StringOps.length(StringOps.scala:47)
    2017-10-19 17:59:13 ERROR [Crawler.$anonfun$crawl$4.200]    at scala.collection.IndexedSeqOptimized.isEmpty(IndexedSeqOptimized.scala:26)
    2017-10-19 17:59:13 ERROR [Crawler.$anonfun$crawl$4.200]    at scala.collection.IndexedSeqOptimized.isEmpty$(IndexedSeqOptimized.scala:26)
    2017-10-19 17:59:13 ERROR [Crawler.$anonfun$crawl$4.200]    at scala.collection.immutable.StringOps.isEmpty(StringOps.scala:29)
    2017-10-19 17:59:13 ERROR [Crawler.$anonfun$crawl$4.200]    at scala.collection.TraversableOnce.nonEmpty(TraversableOnce.scala:111)
    2017-10-19 17:59:13 ERROR [Crawler.$anonfun$crawl$4.200]    at scala.collection.TraversableOnce.nonEmpty$(TraversableOnce.scala:111)
    2017-10-19 17:59:13 ERROR [Crawler.$anonfun$crawl$4.200]    at scala.collection.immutable.StringOps.nonEmpty(StringOps.scala:29)
    2017-10-19 17:59:13 ERROR [Crawler.$anonfun$crawl$4.200]    at com.testerhome.appcrawler.Crawler.refreshPage(Crawler.scala:553)
    2017-10-19 17:59:13 ERROR [Crawler.$anonfun$crawl$4.200]    at com.testerhome.appcrawler.Crawler.doElementAction(Crawler.scala:1048)
    2017-10-19 17:59:13 ERROR [Crawler.$anonfun$crawl$4.200]    at com.testerhome.appcrawler.Crawler.crawl(Crawler.scala:809)
    2017-10-19 17:59:13 ERROR [Crawler.$anonfun$crawl$4.200]    at com.testerhome.appcrawler.Crawler.$anonfun$crawl$1(Crawler.scala:173)
    2017-10-19 17:59:13 ERROR [Crawler.$anonfun$crawl$4.200]    at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
    2017-10-19 17:59:13 ERROR [Crawler.$anonfun$crawl$4.200]    at scala.util.Try$.apply(Try.scala:209)
    2017-10-19 17:59:13 ERROR [Crawler.$anonfun$crawl$4.200]    at com.testerhome.appcrawler.Crawler.crawl(Crawler.scala:173)
    2017-10-19 17:59:13 ERROR [Crawler.$anonfun$crawl$4.200]    at com.testerhome.appcrawler.Crawler.start(Crawler.scala:157)
    2017-10-19 17:59:13 ERROR [Crawler.$anonfun$crawl$4.200]    at com.testerhome.appcrawler.AppCrawler$.startCrawl(AppCrawler.scala:342)
    2017-10-19 17:59:13 ERROR [Crawler.$anonfun$crawl$4.200]    at com.testerhome.appcrawler.AppCrawler$.parseParams(AppCrawler.scala:310)
    2017-10-19 17:59:13 ERROR [Crawler.$anonfun$crawl$4.200]    at com.testerhome.appcrawler.AppCrawler$.main(AppCrawler.scala:90)
    2017-10-19 17:59:13 ERROR [Crawler.$anonfun$crawl$4.200]    at com.testerhome.appcrawler.AppCrawler.main(AppCrawler.scala)
    
  • 问题已解决,wda的问题,xocde9目前只能用ios11设备跑

  • wda上了该问题的解法了:https://github.com/facebook/WebDriverAgent/issues/703

    xcode9 目前看必须用ios11的设备跑,就没有问题

  • @seveniruby 谢谢,看到了。。

    <XCUIElementTypeOther type=\"XCUIElementTypeOther\" value=\"AX error -25205\" name=\"AX error -25205\" label=\"AX error -25205\" enabled=\"true\" visible=\"true\" x=\"0\" y=\"0\" width=\"320\" height=\"568\">
    

    有一个新的问题,最新版的appium在IOS上获取的信息好奇怪啊,所有元素的name都是AX error -25205,请问你遇到么?

  • @seveniruby 支持macaca的哪个版本呢?

  • 提供个yml配置文件的样本吧

  • AppCrawler 使用 Macaca 问题 at 2017年10月17日

    什么时候计划搞一下呢,macaca最新版本已经支持xcode9,appium还不支持

  • 哪里有配置文件的详细说明?

    2017-10-17 12:33:47 INFO [Runtimes$.eval.65] driver.swipe(0.9, 0,5, 0.1, 0.5)
    <console>:12: error: overloaded method value swipe with alternatives:
      (startX: Double,endX: Double,startY: Double,endY: Double)Option[_] <and>
      (direction: String)Unit
     cannot be applied to (Double, Int, Int, Double, Double)
           driver.swipe(0.9, 0,5, 0.1, 0.5)
                  ^
    

    api报错

怎么变得更好呢~~