Appium AppCrawler 2.4.0 遍历 iOS 13.1.2 执行失败,请帮忙看看咋回事呢!

季文洪 · 2019年10月18日 · 最后由 少年不识月 回复于 2020年08月20日 · 1698 次阅读

java -jar ../COMMON/appcrawler-2.4.0.jar -u http://localhost:4723/wd/hub -o ioslog/ -c ../COMMON/configios.yml --capability bundleId=com.360buy.jdmobile
[ appcrawler tranverse app ]: check appcrawler, for 0 s
2019-10-18 15:33:39 INFO [AppCrawler$.86.main]

AppCrawler 2.4.0 [霍格沃兹测试学院特别纪念版]
Appium 1.8.1 Java8 tested

2019-10-18 15:33:39 INFO [AppCrawler$.203.parseParams] Find Conf /st/exe-auto/AutoProtocol/nfq/../COMMON/configios.yml
2019-10-18 15:33:39 INFO [AppCrawler$.230.parseParams] appium address = Some(http://localhost:4723/wd/hub)
2019-10-18 15:33:39 INFO [AppCrawler$.242.parseParams] result directory = ioslog/
2019-10-18 15:33:39 INFO [Crawler.130.start] set xpath attribute with List(name, label, value, resource-id, content-desc, instance, text)
2019-10-18 15:33:39 INFO [Crawler.135.start] set xpath
2019-10-18 15:33:39 INFO [Crawler.89.$anonfun$loadPlugins$2] com.testerhome.appcrawler.plugin.TagLimitPlugin@1c8f6a90
2019-10-18 15:33:39 INFO [Crawler.89.$anonfun$loadPlugins$2] com.testerhome.appcrawler.plugin.ReportPlugin@1937eaff
2019-10-18 15:33:39 INFO [Crawler.89.$anonfun$loadPlugins$2] com.testerhome.appcrawler.plugin.FreeMind@4b0f2299
2019-10-18 15:33:39 INFO [TagLimitPlugin.19.init] com.testerhome.appcrawler.plugin.TagLimitPlugin init
2019-10-18 15:33:39 INFO [ReportPlugin.19.init] com.testerhome.appcrawler.plugin.ReportPlugin init
2019-10-18 15:33:39 INFO [FreeMind.19.init] com.testerhome.appcrawler.plugin.FreeMind init
2019-10-18 15:33:39 INFO [ReportPlugin.21.start] reportPath=/st/exe-auto/AutoProtocol/nfq/ioslog
2019-10-18 15:33:39 INFO [Crawler.138.start] prepare setup Appium
2019-10-18 15:33:39 INFO [Crawler.250.setupAppium] afterPageMax=2
2019-10-18 15:33:40 INFO [Crawler.273.setupAppium] use AppiumClient
2019-10-18 15:33:40 INFO [Crawler.274.setupAppium] Map(newCommandTimeout -> 120, bundleId -> com.360buy.jdmobile, launchTimeout -> 120000, appium -> http://localhost:4723/wd/hub, noReset -> true, dontStopAppOnReset -> true)
Exception in thread "main" org.openqa.selenium.WebDriverException: It is impossible to create a new session because 'createSession' which takes HttpClient, InputStream and long was not found or it is not accessible
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: host: 'Mac-20190730deMac-mini.local', ip: 'fe80:0:0:0:856:80c6:35f2:42ee%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.14.6', java.version: '1.8.0_77'
Driver info: driver.version: IOSDriver
at io.appium.java_client.remote.AppiumCommandExecutor$1.createSession(AppiumCommandExecutor.java:195)
at io.appium.java_client.remote.AppiumCommandExecutor.createSession(AppiumCommandExecutor.java:209)
at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:231)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:543)
at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:42)
at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
at io.appium.java_client.ios.IOSDriver.execute(IOSDriver.java:1)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:207)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:130)
at io.appium.java_client.DefaultGenericMobileDriver.(DefaultGenericMobileDriver.java:38)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:84)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:94)
at io.appium.java_client.ios.IOSDriver.(IOSDriver.java:95)
at com.testerhome.appcrawler.driver.AppiumClient.appium(AppiumClient.scala:107)
at com.testerhome.appcrawler.driver.AppiumClient.(AppiumClient.scala:40)
at com.testerhome.appcrawler.Crawler.setupAppium(Crawler.scala:277)
at com.testerhome.appcrawler.Crawler.start(Crawler.scala:139)
at com.testerhome.appcrawler.AppCrawler$.startCrawl(AppCrawler.scala:322)
at com.testerhome.appcrawler.AppCrawler$.parseParams(AppCrawler.scala:290)
at com.testerhome.appcrawler.AppCrawler$.main(AppCrawler.scala:91)
at com.testerhome.appcrawler.AppCrawler.main(AppCrawler.scala)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at io.appium.java_client.remote.AppiumCommandExecutor$1.createSession(AppiumCommandExecutor.java:185)
... 20 more
Caused by: org.openqa.selenium.SessionNotCreatedException: A new session could not be created. Details: Appium's IosDriver does not support Xcode version 11.0. Apple has deprecated UIAutomation. Use the "XCUITest" automationName capability instead.
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: host: 'Mac-20190730deMac-mini.local', ip: 'fe80:0:0:0:856:80c6:35f2:42ee%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.14.6', java.version: '1.8.0_77'
Driver info: driver.version: IOSDriver
remote stacktrace: SessionNotCreatedError: A new session could not be created. Details: Appium's IosDriver does not support Xcode version 11.0. Apple has deprecated UIAutomation. Use the "XCUITest" automationName capability instead.
at IosDriver.createSession (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-ios-driver/lib/driver.js:129:28)
at process._tickCallback (internal/process/next_tick.js:68:7)
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.W3CHandshakeResponse.lambda$new$0(W3CHandshakeResponse.java:57)
at org.openqa.selenium.remote.W3CHandshakeResponse.lambda$getResponseFunction$2(W3CHandshakeResponse.java:104)
at org.openqa.selenium.remote.ProtocolHandshake.lambda$createSession$0(ProtocolHandshake.java:123)
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
at java.util.Spliterators$ArraySpliterator.tryAdvance(Spliterators.java:958)
at java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:126)
at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:498)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:485)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
at java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:152)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:464)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:126)
... 25 more
[ appcrawler tranverse app ]: sub_thread.pid = 32109 term

共收到 4 条回复 时间 点赞

automationName: XCUITest
配置中加了上面的信息之后,新的报错:

2019-10-22 14:49:02 INFO [Crawler.274.setupAppium] Map(newCommandTimeout -> 120, bundleId -> com.360buy.jdmobile, automationName -> XCUITest, launchTimeout -> 120000, appium -> http://localhost:4723/wd/hub, noReset -> true, dontStopAppOnReset -> true)
Exception in thread "main" org.openqa.selenium.WebDriverException: It is impossible to create a new session because 'createSession' which takes HttpClient, InputStream and long was not found or it is not accessible
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: host: 'Mac-20190730deMac-mini.local', ip: 'fe80:0:0:0:449:597a:6b37:496f%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.14.6', java.version: '1.8.0_77'
Driver info: driver.version: IOSDriver
at io.appium.java_client.remote.AppiumCommandExecutor$1.createSession(AppiumCommandExecutor.java:195)
at io.appium.java_client.remote.AppiumCommandExecutor.createSession(AppiumCommandExecutor.java:209)
at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:231)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:543)
at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:42)
at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
at io.appium.java_client.ios.IOSDriver.execute(IOSDriver.java:1)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:207)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:130)
at io.appium.java_client.DefaultGenericMobileDriver.(DefaultGenericMobileDriver.java:38)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:84)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:94)
at io.appium.java_client.ios.IOSDriver.(IOSDriver.java:95)
at com.testerhome.appcrawler.driver.AppiumClient.appium(AppiumClient.scala:107)
at com.testerhome.appcrawler.driver.AppiumClient.(AppiumClient.scala:40)
at com.testerhome.appcrawler.Crawler.setupAppium(Crawler.scala:277)
at com.testerhome.appcrawler.Crawler.start(Crawler.scala:139)
at com.testerhome.appcrawler.AppCrawler$.startCrawl(AppCrawler.scala:322)
at com.testerhome.appcrawler.AppCrawler$.parseParams(AppCrawler.scala:290)
at com.testerhome.appcrawler.AppCrawler$.main(AppCrawler.scala:91)
at com.testerhome.appcrawler.AppCrawler.main(AppCrawler.scala)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at io.appium.java_client.remote.AppiumCommandExecutor$1.createSession(AppiumCommandExecutor.java:185)
... 20 more
Caused by: org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Could not create simulator with name 'appiumTest-DD5C528F-40A4-4671-97FF-23389F454D11-demo', device type id 'demo' and runtime id 'com.apple.CoreSimulator.SimRuntime.iOS-13-0'. Reason: 'simctl error running 'create': Invalid device type: demo'

请问现在可以成功运行了吗?

请问可以运行成功了吗

遇到了同样的报错,请问现在运行成功了吗?

需要 登录 后方可回复, 如果你还没有账号请点击这里 注册