问题描述:同样的配置文件,在2.7.0版本运行过程中跑出异常,有人遇到过这种问题吗?
The element XXX does not exist in DOM anymore
2021-11-08 13:47:11 ERROR [Log.198.$anonfun$crawlWithRetry$2] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
2021-11-08 13:47:11 ERROR [Log.198.$anonfun$crawlWithRetry$2] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
2021-11-08 13:47:11 ERROR [Log.198.$anonfun$crawlWithRetry$2] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
2021-11-08 13:47:11 ERROR [Log.198.$anonfun$crawlWithRetry$2] at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
2021-11-08 13:47:11 ERROR [Log.198.$anonfun$crawlWithRetry$2] at org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:187)
2021-11-08 13:47:11 ERROR [Log.198.$anonfun$crawlWithRetry$2] at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:122)
2021-11-08 13:47:11 ERROR [Log.198.$anonfun$crawlWithRetry$2] at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:49)
2021-11-08 13:47:11 ERROR [Log.198.$anonfun$crawlWithRetry$2] at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
2021-11-08 13:47:11 ERROR [Log.198.$anonfun$crawlWithRetry$2] at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:250)
2021-11-08 13:47:11 ERROR [Log.198.$anonfun$crawlWithRetry$2] at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
2021-11-08 13:47:11 ERROR [Log.198.$anonfun$crawlWithRetry$2] at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:41)
2021-11-08 13:47:11 ERROR [Log.198.$anonfun$crawlWithRetry$2] at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
2021-11-08 13:47:11 ERROR [Log.198.$anonfun$crawlWithRetry$2] at io.appium.java_client.android.AndroidDriver.execute(AndroidDriver.java:1)
2021-11-08 13:47:11 ERROR [Log.198.$anonfun$crawlWithRetry$2] at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:285)
2021-11-08 13:47:11 ERROR [Log.198.$anonfun$crawlWithRetry$2] at io.appium.java_client.DefaultGenericMobileElement.execute(DefaultGenericMobileElement.java:45)
2021-11-08 13:47:11 ERROR [Log.198.$anonfun$crawlWithRetry$2] at io.appium.java_client.MobileElement.execute(MobileElement.java:1)
2021-11-08 13:47:11 ERROR [Log.198.$anonfun$crawlWithRetry$2] at io.appium.java_client.android.AndroidElement.execute(AndroidElement.java:1)
2021-11-08 13:47:11 ERROR [Log.198.$anonfun$crawlWithRetry$2] at org.openqa.selenium.remote.RemoteWebElement.getLocation(RemoteWebElement.java:337)
2021-11-08 13:47:11 ERROR [Log.198.$anonfun$crawlWithRetry$2] at com.ceshiren.appcrawler.driver.SeleniumDriver.getRect(SeleniumDriver.scala:235)
2021-11-08 13:47:11 ERROR [Log.198.$anonfun$crawlWithRetry$2] at com.ceshiren.appcrawler.core.Crawler.saveElementScreenshot(Crawler.scala:1150)
2021-11-08 13:47:11 ERROR [Log.198.$anonfun$crawlWithRetry$2] at com.ceshiren.appcrawler.core.Crawler.doElementAction(Crawler.scala:1031)
2021-11-08 13:47:11 ERROR [Log.198.$anonfun$crawlWithRetry$2] at com.ceshiren.appcrawler.core.Crawler.crawl(Crawler.scala:999)
2021-11-08 13:47:11 ERROR [Log.198.$anonfun$crawlWithRetry$2] at com.ceshiren.appcrawler.core.Crawler.$anonfun$crawlWithRetry$1(Crawler.scala:187)
2021-11-08 13:47:11 ERROR [Log.198.$anonfun$crawlWithRetry$2] at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
2021-11-08 13:47:11 ERROR [Log.198.$anonfun$crawlWithRetry$2] at scala.util.Try$.apply(Try.scala:210)
2021-11-08 13:47:11 ERROR [Log.198.$anonfun$crawlWithRetry$2] at com.ceshiren.appcrawler.core.Crawler.crawlWithRetry(Crawler.scala:187)
2021-11-08 13:47:11 ERROR [Log.198.$anonfun$crawlWithRetry$2] at com.ceshiren.appcrawler.core.Crawler.start(Crawler.scala:169)
2021-11-08 13:47:11 ERROR [Log.198.$anonfun$crawlWithRetry$2] at com.ceshiren.appcrawler.AppCrawler$.startCrawl(AppCrawler.scala:333)
2021-11-08 13:47:11 ERROR [Log.198.$anonfun$crawlWithRetry$2] at com.ceshiren.appcrawler.AppCrawler$.parseParams(AppCrawler.scala:300)
2021-11-08 13:47:11 ERROR [Log.198.$anonfun$crawlWithRetry$2] at com.ceshiren.appcrawler.AppCrawler$.main(AppCrawler.scala:84)
2021-11-08 13:47:11 ERROR [Log.198.$anonfun$crawlWithRetry$2] at com.ceshiren.appcrawler.AppCrawler.main(AppCrawler.scala)
2021-11-08 13:47:11 ERROR [Log.199.crawlWithRetry] create new session
Exception in thread "main" org.openqa.selenium.StaleElementReferenceException: The element 'By.xpath: //*[@resource-id='com.jlpay.merch:id/btn_ensure' and @text='提交申请']' does not exist in DOM anymore
For documentation on this error, please visit: https://www.seleniumhq.org/exceptions/stale_element_reference.html
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: host: 'kongdexideMac-mini.local', ip: 'fe80:0:0:0:181b:434a:6020:f056%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.16', java.version: '1.8.0_131'
Driver info: io.appium.java_client.android.AndroidDriver
Capabilities {app: , appActivity: .ui.start.SplashActivity, appPackage: com.jlpay.merch, appium: http://127.0.0.1:4723/wd/hub, autoLaunch: true, databaseEnabled: false, desired: {app: , appActivity: .ui.start.SplashActivity, appPackage: com.jlpay.merch, appium: http://127.0.0.1:4723/wd/hub, autoLaunch: true, deviceName: oppo, fullReset: false, newCommandTimeout: 120, noReset: true, platformName: android, platformVersion: }, deviceApiLevel: 30, deviceManufacturer: OPPO, deviceModel: PDKM00, deviceName: NZKRMFZ9RSLRAQGY, deviceScreenDensity: 480, deviceScreenSize: 1080x2400, deviceUDID: NZKRMFZ9RSLRAQGY, fullReset: false, javascriptEnabled: true, locationContextEnabled: false, networkConnectionEnabled: true, newCommandTimeout: 120, noReset: true, pixelRatio: 3, platform: LINUX, platformName: Android, platformVersion: 11, statBarHeight: 112, takesScreenshot: true, viewportRect: {height: 2176, left: 0, top: 112, width: 1080}, warnings: {}, webStorageEnabled: false}
Session ID: 9c2d6624-7702-413c-a48b-0592e538a1d6
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:187)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:122)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:49)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:250)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:41)
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.RemoteWebElement.execute(RemoteWebElement.java:285)
at io.appium.java_client.DefaultGenericMobileElement.execute(DefaultGenericMobileElement.java:45)
at io.appium.java_client.MobileElement.execute(MobileElement.java:1)
at io.appium.java_client.android.AndroidElement.execute(AndroidElement.java:1)
at org.openqa.selenium.remote.RemoteWebElement.getLocation(RemoteWebElement.java:337)
at com.ceshiren.appcrawler.driver.SeleniumDriver.getRect(SeleniumDriver.scala:235)
at com.ceshiren.appcrawler.core.Crawler.saveElementScreenshot(Crawler.scala:1150)
at com.ceshiren.appcrawler.core.Crawler.doElementAction(Crawler.scala:1031)
at com.ceshiren.appcrawler.core.Crawler.crawl(Crawler.scala:999)
at com.ceshiren.appcrawler.core.Crawler.$anonfun$crawlWithRetry$1(Crawler.scala:187)
at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
at scala.util.Try$.apply(Try.scala:210)