求助:使用 appcrawler,老是报错,报错信息:javax.xml.transform.TransformerExce...
求助:使用 appcrawler,老是报错,报错信息:javax.xml.transform.TransformerException: 需要位置路径, 但遇到以下标记: ‘行情’,要怎么解决报错信息AutomationSuite:
2020-04-22 00:15:56 INFO beforeAll
2020-04-22 00:15:56 INFO testcase start
2020-04-22 00:15:56 INFO Step(null,null,null,跳过,click,null,0)
2020-04-22 00:15:56 INFO 跳过
2020-04-22 00:15:56 INFO click
2020-04-22 00:15:56 INFO current element = Steps.tag=TextView.depth=8.id=tv_jump.text=跳过
2020-04-22 00:15:56 INFO current index = 1
2020-04-22 00:15:56 INFO current action = click
2020-04-22 00:15:56 INFO current xpath = //[@resource-id="com.ykkg.lz:id/action_bar_root"]//[@resource-id="android:id/content"]//[@resource-id="com.ykkg.lz:id/rl_root"]//[@text="跳过" and @resource-id="com.ykkg.lz:id/tv_jump"]
2020-04-22 00:15:56 INFO current url = Steps
2020-04-22 00:15:56 INFO current tag path = hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.TextView
2020-04-22 00:15:56 INFO current file name = Steps.tag=TextView.depth=8.id=tv_jump.text=跳过
2020-04-22 00:15:56 INFO save reqHash to 1
2020-04-22 00:15:56 INFO save reqImg 20200422001533/1_Steps.tag=TextView.depth=8.id=tv_jump.text=跳过.click.png to 1
2020-04-22 00:15:56 INFO save reqDom to 1
2020-04-22 00:15:56 INFO need input click
2020-04-22 00:15:56 INFO find by uri element= Steps.tag=TextView.depth=8.id=tv_jump.text=跳过
2020-04-22 00:15:56 INFO findElementByAndroidUIAutomator new UiSelector().className("android.widget.TextView").text("跳过").resourceId("com.ykkg.lz:id/tv_jump")
2020-04-22 00:15:56 INFO find by xpath success
2020-04-22 00:15:56 INFO mark 20200422001533/0_SplashActiveActivity.tag=start.id=start.clicked.png to 20200422001533/1_Steps.tag=TextView.depth=8.id=tv_jump.text=跳过.click.png
2020-04-22 00:15:56 INFO read from 20200422001533/0_SplashActiveActivity.tag=start.id=start.clicked.png
2020-04-22 00:15:59 INFO write png 20200422001533/0_SplashActiveActivity.tag=start.id=start.clicked.png
2020-04-22 00:15:59 INFO ImageIO.write newImageName 20200422001533/1_Steps.tag=TextView.depth=8.id=tv_jump.text=跳过.click.png
2020-04-22 00:16:00 INFO click element
2020-04-22 00:16:00 INFO [ -> -android uiautomator: new UiSelector().className("android.widget.TextView").text("跳过").resourceId("com.ykkg.lz:id/tv_jump")]
2020-04-22 00:16:02 INFO mark image exist
2020-04-22 00:16:02 INFO sleep 500 for loading
2020-04-22 00:16:03 INFO refresh page
2020-04-22 00:16:03 INFO start to get page source from appium
2020-04-22 00:16:03 INFO xml format
2020-04-22 00:16:03 INFO appName =
2020-04-22 00:16:03 INFO url=MainActivity
2020-04-22 00:16:04 INFO currentContentHash=150a5c764690a3d0af3e1fffdab3c011 lastContentHash=d10e6132ee8d3b2bd7fa6854da178699
2020-04-22 00:16:04 INFO ui change
2020-04-22 00:16:04 INFO save to 20200422001533/1_Steps.tag=TextView.depth=8.id=tv_jump.text=跳过.dom
2020-04-22 00:16:04 INFO start screenshot
2020-04-22 00:16:04 INFO ui change screenshot again
2020-04-22 00:16:05 INFO screenshot success
2020-04-22 00:16:05 INFO save resHash to 1
2020-04-22 00:16:05 INFO save resImg 20200422001533/1_Steps.tag=TextView.depth=8.id=tv_jump.text=跳过.clicked.png to 1
2020-04-22 00:16:05 INFO save resDom to 1
2020-04-22 00:16:05 INFO finish run steps
run steps 2020-04-22 00:16:05 INFO refresh page 2020-04-22 00:16:05 INFO start to get page source from appium 2020-04-22 00:16:06 INFO xml format 2020-04-22 00:16:06 INFO appName = 2020-04-22 00:16:06 INFO url=MainActivity 2020-04-22 00:16:06 INFO currentContentHash=3d9930cd9d5328c64b4fef63ed06d2ba lastContentHash=150a5c764690a3d0af3e1fffdab3c011 2020-04-22 00:16:06 INFO ui change 2020-04-22 00:16:06 INFO add shutdown hook 2020-04-22 00:16:06 INFO
crawl next
2020-04-22 00:16:06 INFO urlStack=Stack(MainActivity) baseUrl=List() maxDepth=10
2020-04-22 00:16:06 INFO no need to back
2020-04-22 00:16:06 INFO selected nodes size = 9
2020-04-22 00:16:06 ERROR crawl not finish, return with exception
2020-04-22 00:16:06 ERROR javax.xml.transform.TransformerException: 需要位置路径, 但遇到以下标记: ‘行情’
2020-04-22 00:16:06 ERROR TransformerException: 需要位置路径, 但遇到以下标记: ‘行情’
2020-04-22 00:16:06 ERROR javax.xml.transform.TransformerException: 需要位置路径, 但遇到以下标记: ‘行情’
2020-04-22 00:16:06 ERROR javax.xml.transform.TransformerException: 需要位置路径, 但遇到以下标记: ‘行情’
2020-04-22 00:16:06 ERROR javax.xml.xpath.XPathExpressionException: javax.xml.transform.TransformerException: 需要位置路径, 但遇到以下标记: ‘行情’
2020-04-22 00:16:06 ERROR at com.sun.org.apache.xpath.internal.compiler.XPathParser.error(XPathParser.java:612)
2020-04-22 00:16:06 ERROR at com.sun.org.apache.xpath.internal.compiler.XPathParser.LocationPath(XPathParser.java:1603)
2020-04-22 00:16:06 ERROR at com.sun.org.apache.xpath.internal.compiler.XPathParser.PathExpr(XPathParser.java:1319)
2020-04-22 00:16:06 ERROR at com.sun.org.apache.xpath.internal.compiler.XPathParser.UnionExpr(XPathParser.java:1238)
2020-04-22 00:16:06 ERROR at com.sun.org.apache.xpath.internal.compiler.XPathParser.UnaryExpr(XPathParser.java:1144)
2020-04-22 00:16:06 ERROR at com.sun.org.apache.xpath.internal.compiler.XPathParser.MultiplicativeExpr(XPathParser.java:1065)
2020-04-22 00:16:06 ERROR at com.sun.org.apache.xpath.internal.compiler.XPathParser.AdditiveExpr(XPathParser.java:1007)
2020-04-22 00:16:06 ERROR at com.sun.org.apache.xpath.internal.compiler.XPathParser.RelationalExpr(XPathParser.java:932)
2020-04-22 00:16:06 ERROR at com.sun.org.apache.xpath.internal.compiler.XPathParser.EqualityExpr(XPathParser.java:872)
2020-04-22 00:16:06 ERROR at com.sun.org.apache.xpath.internal.compiler.XPathParser.EqualityExpr(XPathParser.java:896)
2020-04-22 00:16:06 ERROR at com.sun.org.apache.xpath.internal.compiler.XPathParser.AndExpr(XPathParser.java:836)
2020-04-22 00:16:06 ERROR at com.sun.org.apache.xpath.internal.compiler.XPathParser.AndExpr(XPathParser.java:842)
2020-04-22 00:16:06 ERROR at com.sun.org.apache.xpath.internal.compiler.XPathParser.OrExpr(XPathParser.java:809)
2020-04-22 00:16:06 ERROR at com.sun.org.apache.xpath.internal.compiler.XPathParser.Expr(XPathParser.java:792)
2020-04-22 00:16:06 ERROR at com.sun.org.apache.xpath.internal.compiler.XPathParser.PredicateExpr(XPathParser.java:1956)
2020-04-22 00:16:06 ERROR at com.sun.org.apache.xpath.internal.compiler.XPathParser.Predicate(XPathParser.java:1938)
2020-04-22 00:16:06 ERROR at com.sun.org.apache.xpath.internal.compiler.XPathParser.Step(XPathParser.java:1728)
2020-04-22 00:16:06 ERROR at com.sun.org.apache.xpath.internal.compiler.XPathParser.RelativeLocationPath(XPathParser.java:1628)
2020-04-22 00:16:06 ERROR at com.sun.org.apache.xpath.internal.compiler.XPathParser.LocationPath(XPathParser.java:1599)
2020-04-22 00:16:06 ERROR at com.sun.org.apache.xpath.internal.compiler.XPathParser.PathExpr(XPathParser.java:1319)
2020-04-22 00:16:06 ERROR at com.sun.org.apache.xpath.internal.compiler.XPathParser.UnionExpr(XPathParser.java:1238)
2020-04-22 00:16:06 ERROR at com.sun.org.apache.xpath.internal.compiler.XPathParser.UnaryExpr(XPathParser.java:1144)
2020-04-22 00:16:06 ERROR at com.sun.org.apache.xpath.internal.compiler.XPathParser.MultiplicativeExpr(XPathParser.java:1065)
2020-04-22 00:16:06 ERROR at com.sun.org.apache.xpath.internal.compiler.XPathParser.AdditiveExpr(XPathParser.java:1007)
2020-04-22 00:16:06 ERROR at com.sun.org.apache.xpath.internal.compiler.XPathParser.RelationalExpr(XPathParser.java:932)
2020-04-22 00:16:06 ERROR at com.sun.org.apache.xpath.internal.compiler.XPathParser.EqualityExpr(XPathParser.java:872)
2020-04-22 00:16:06 ERROR at com.sun.org.apache.xpath.internal.compiler.XPathParser.AndExpr(XPathParser.java:836)
2020-04-22 00:16:06 ERROR at com.sun.org.apache.xpath.internal.compiler.XPathParser.OrExpr(XPathParser.java:809)
2020-04-22 00:16:06 ERROR at com.sun.org.apache.xpath.internal.compiler.XPathParser.Expr(XPathParser.java:792)
2020-04-22 00:16:06 ERROR at com.sun.org.apache.xpath.internal.compiler.XPathParser.initXPath(XPathParser.java:131)
2020-04-22 00:16:06 ERROR at com.sun.org.apache.xpath.internal.XPath.(XPath.java:180)
2020-04-22 00:16:06 ERROR at com.sun.org.apache.xpath.internal.XPath.(XPath.java:268)
2020-04-22 00:16:06 ERROR at com.sun.org.apache.xpath.internal.jaxp.XPathImpl.compile(XPathImpl.java:390)
2020-04-22 00:16:06 ERROR at com.testerhome.appcrawler.XPathUtil$.getNodeListFromXML(XPathUtil.scala:167)
2020-04-22 00:16:06 ERROR at com.testerhome.appcrawler.XPathUtil$.getNodeListFromXPath(XPathUtil.scala:183)
2020-04-22 00:16:06 ERROR at com.testerhome.appcrawler.XPathUtil$.getNodeListByKey(XPathUtil.scala:271)
2020-04-22 00:16:06 ERROR at com.testerhome.appcrawler.Crawler.$anonfun$getAvailableElement$4(Crawler.scala:493)
2020-04-22 00:16:06 ERROR at com.testerhome.appcrawler.Crawler.$anonfun$getAvailableElement$4$adapted(Crawler.scala:491)
2020-04-22 00:16:06 ERROR at scala.collection.immutable.List.foreach(List.scala:389)
2020-04-22 00:16:06 ERROR at scala.collection.generic.TraversableForwarder.foreach(TraversableForwarder.scala:35)
2020-04-22 00:16:06 ERROR at scala.collection.generic.TraversableForwarder.foreach$(TraversableForwarder.scala:35)
2020-04-22 00:16:06 ERROR at scala.collection.mutable.ListBuffer.foreach(ListBuffer.scala:44)
2020-04-22 00:16:06 ERROR at com.testerhome.appcrawler.Crawler.getAvailableElement(Crawler.scala:491)
2020-04-22 00:16:06 ERROR at com.testerhome.appcrawler.Crawler.crawl(Crawler.scala:840)
2020-04-22 00:16:06 ERROR at com.testerhome.appcrawler.Crawler.$anonfun$crawl$1(Crawler.scala:187)
2020-04-22 00:16:06 ERROR at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
2020-04-22 00:16:06 ERROR at scala.util.Try$.apply(Try.scala:209)
2020-04-22 00:16:06 ERROR at com.testerhome.appcrawler.Crawler.crawl(Crawler.scala:187)
2020-04-22 00:16:06 ERROR at com.testerhome.appcrawler.Crawler.start(Crawler.scala:170)
2020-04-22 00:16:06 ERROR at com.testerhome.appcrawler.AppCrawler$.startCrawl(AppCrawler.scala:322)
2020-04-22 00:16:06 ERROR at com.testerhome.appcrawler.AppCrawler$.parseParams(AppCrawler.scala:290)
2020-04-22 00:16:06 ERROR at com.testerhome.appcrawler.AppCrawler$.main(AppCrawler.scala:91)
2020-04-22 00:16:06 ERROR at com.testerhome.appcrawler.AppCrawler.main(AppCrawler.scala)
2020-04-22 00:16:06 ERROR create new session
2020-04-22 00:16:06 INFO execute shell on restart
2020-04-22 00:16:06 INFO restart appium
2020-04-22 00:16:06 INFO afterPageMax=2
2020-04-22 00:16:06 INFO use AppiumClient我确实把 “行情” 加入到 blacklist 里面去了,不知道是不是这个原因
文本内容也可以的吧
页:
[1]