问题
app一直循环在get page source成功,又跳回这一步
报错信息
没有报错,log打印了page source后一直循环去get page source
日志发一下,发完整一点哈
看了下 是没有重新安装app进行启动的话。就一直在跑下面的log,如果执行命令加上了重新安装app的话 就变正常
2023-02-21 15:26:34 INFO [ReactWebDriver.111.$anonfun$getPageSourceWithRetry$1] xml format
2023-02-21 15:26:34 TRACE [XPathUtil$.233.getNodeListByXPath] nodeList length 1 with (//[@package!=’’])[1]
2023-02-21 15:26:34 TRACE [XPathUtil$.336.getNodeListByXPath] filted node list length 1
2023-02-21 15:26:34 INFO [Crawler.711.parsePageContext] appName = com.guotai.dazhihui
2023-02-21 15:26:34 TRACE [XPathUtil$.336.getNodeListByXPath] filted node list length 1
2023-02-21 15:26:34 INFO [Crawler.373.getUri] defineUrl=行情
2023-02-21 15:26:34 TRACE [XPathUtil$.233.getNodeListByXPath] nodeList length 1 with (//[@package!=’’])[1]
2023-02-21 15:26:34 TRACE [XPathUtil$.336.getNodeListByXPath] filted node list length 1
2023-02-21 15:26:34 INFO [Crawler.715.parsePageContext] url=com.guotai.dazhihui.行情
2023-02-21 15:26:34 TRACE [Crawler.731.parsePageContext] urlStack=Stack(com.guotai.dazhihui.行情)
2023-02-21 15:26:34 INFO [Crawler.742.parsePageContext] currentContentHash=ab0eadfef15cc997b816dce0e3c36df3 lastContentHash=ab0eadfef15cc997b816dce0e3c36df3
2023-02-21 15:26:34 INFO [Crawler.746.parsePageContext] ui not change
2023-02-21 15:26:34 TRACE [XPathUtil$.233.getNodeListByXPath] nodeList length 0 with //*[contains(@text, ‘App’)]
2023-02-21 15:26:34 TRACE [XPathUtil$.336.getNodeListByXPath] filted node list length 0
2023-02-21 15:26:35 INFO [Crawler.185.$anonfun$waitAppLoaded$1] wait for app loaded
2023-02-21 15:26:35 INFO [Crawler.693.refreshPage] refresh page
2023-02-21 15:26:35 INFO [ReactWebDriver.88.getPageSourceWithRetry] start to get page source from appium
2023-02-21 15:26:35 TRACE [ReactWebDriver.95.$anonfun$getPageSourceWithRetry$1] get raw page source success
2023-02-21 15:26:35 DEBUG [ReactWebDriver.98.$anonfun$getPageSourceWithRetry$1] <?xml version='1.0' encoding='UTF-8' standalone='yes' ?>
<android.widget.FrameLayout index=“0” package=“com.guotai.dazhihui” class=“android.widget.FrameLayout” text="" checkable=“false” checked=“false” clickable=“false” enabled=“true” focusable=“false” focused=“false” long-clickable=“false” password=“false” scrollable=“false” selected=“false” bounds="[0,0][1080,2304]" displayed=“true”>
2023-02-21 16:04:38 INFO [Crawler.742.parsePageContext] currentContentHash=45fd50840b0593f54c564d3c30f04717 lastContentHash=45fd50840b0593f54c564d3c30f04717
2023-02-21 16:04:38 INFO [Crawler.746.parsePageContext] ui not change
2023-02-21 16:04:38 INFO [Crawler.1201.saveDom] save to result6//0_com.guotai.dazhihui.机会.tag=Start.depth=2.id=Start.name=Start.clicked.xml
2023-02-21 16:04:38 INFO [URIElementStore.75.saveResHash] save resHash to 0
2023-02-21 16:04:38 INFO [URIElementStore.106.saveResImg] save resImg result6//0_com.guotai.dazhihui.机会.tag=Start.depth=2.id=Start.name=Start.clicked.png to 0
2023-02-21 16:04:38 INFO [URIElementStore.90.saveResDom] save resDom to 0
2023-02-21 16:04:38 INFO [Crawler.160.start] append current app name to appWhiteList
2023-02-21 16:04:38 INFO [Crawler.164.start] run steps
2023-02-21 16:04:38 INFO [Crawler.286.runSteps] run testcases
2023-02-21 16:04:39 INFO [Crawler.185.$anonfun$waitAppLoaded$1] wait for app loaded
2023-02-21 16:04:39 INFO [Crawler.693.refreshPage] refresh page
2023-02-21 16:04:39 INFO [ReactWebDriver.88.getPageSourceWithRetry] start to get page source from appium
2023-02-21 16:04:39 INFO [AutomationSuite.16.beforeAll] beforeAll
AutomationSuite:
2023-02-21 16:04:39 INFO [AutomationSuite.24.$anonfun$new$1] testcase start
2023-02-21 16:04:39 INFO [AutomationSuite.31.$anonfun$new$2] —
given:
when: null
then:
xpath: “//”
action: “Thread.sleep(1000)”
actions:
times: -1
java.lang.NullPointerException:
at com.ceshiren.appcrawler.driver.ReactWebDriver.getNodeListByKey(ReactWebDriver.scala:262)
at com.ceshiren.appcrawler.core.AutomationSuite.$anonfun$new$2(AutomationSuite.scala:35)
at com.ceshiren.appcrawler.core.AutomationSuite.$anonfun$new$2$adapted(AutomationSuite.scala:30)
at scala.collection.immutable.List.foreach(List.scala:333)
at com.ceshiren.appcrawler.core.AutomationSuite.$anonfun$new$1(AutomationSuite.scala:30)
at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
at org.scalatest.OutcomeOf.outcomeOf(OutcomeOf.scala:85)
at org.scalatest.OutcomeOf.outcomeOf$(OutcomeOf.scala:83)
at org.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:104)
at org.scalatest.Transformer.apply(Transformer.scala:22)
… 还有这个