AppCrawler ios appcrawler 使用问题,帮助文档也看了 还是不知道怎么用

王明海 · 2017年05月08日 · 最后由 MLL 回复于 2019年12月10日 · 3871 次阅读

信息

HeminWon-Extranet:appcrawler Hm$ java -jar appcrawler-2.0.0.jar --capability udid=ef5c14f9e5e8f8aaee07b63e26cc7b4304febcff -a EQHexinFee.ipa
2017-05-08 14:09:47 INFO [AppCrawler$.main.160] 
----------------
AppCrawler 2.0.0
app爬虫, 用于自动遍历测试. 支持Android和iOS, 支持真机和模拟器
帮助文档: http://seveniruby.gitbooks.io/appcrawler
移动测试技术交流: https://testerhome.com
感谢: 晓光 泉龙 杨榕 恒温 mikezhou yaming116
感谢提供商业支持的优秀公司: Keep
--------------------------------


2017-05-08 14:09:47 INFO [AppCrawler$.main.202] Set Platform=iOS
2017-05-08 14:09:47 INFO [AppCrawler$.main.233] app path = /Users/Hm/Desktop/appcrawler/EQHexinFee.ipa
2017-05-08 14:09:47 INFO [AppCrawler$.main.243] use default appium address 4723
2017-05-08 14:09:47 INFO [AppCrawler$.main.250] appium address = Some(http://127.0.0.1:4723/wd/hub)
2017-05-08 14:09:47 INFO [AppCrawler$.main.262] result directory = iOS_20170508140945
2017-05-08 14:09:48 INFO [Crawler.loadPlugins.76] dynamic load plugin in /Users/Hm/Desktop/plugins/
2017-05-08 14:09:50 WARN [Runtimes$.loadPlugins.84] no /Users/Hm/Desktop/plugins/ directory, skip
2017-05-08 14:09:50 INFO [Crawler.loadPlugins.78] found dynamic plugins size 0
2017-05-08 14:09:50 INFO [Crawler.apply.80] com.xueqiu.qa.appcrawler.plugin.TagLimitPlugin@6331250e
2017-05-08 14:09:50 INFO [Crawler.apply.80] com.xueqiu.qa.appcrawler.plugin.ReportPlugin@1a411233
2017-05-08 14:09:50 INFO [Crawler.apply.80] com.xueqiu.qa.appcrawler.plugin.FreeMind@7c2327fa
2017-05-08 14:09:50 INFO [TagLimitPlugin.init.17] com.xueqiu.qa.appcrawler.plugin.TagLimitPlugin init
2017-05-08 14:09:50 INFO [ReportPlugin.init.17] com.xueqiu.qa.appcrawler.plugin.ReportPlugin init
2017-05-08 14:09:50 INFO [FreeMind.init.17] com.xueqiu.qa.appcrawler.plugin.FreeMind init
2017-05-08 14:09:50 INFO [ReportPlugin.start.20] reportPath=/Users/Hm/Desktop/appcrawler/iOS_20170508140945
2017-05-08 14:09:50 INFO [ReportPlugin.start.23] create /Users/Hm/Desktop/appcrawler/iOS_20170508140945/tmp/ directory
2017-05-08 14:09:50 INFO [Crawler.handleCtrlC.1130] add shutdown hook
2017-05-08 14:09:50 INFO [Crawler.start.120] prepare setup Appium
2017-05-08 14:09:50 INFO [Crawler.setupAppium.232] use AppiumClient
Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: A new session could not be created. Details: Appium's IosDriver does not support xcode version 8.3.2. Apple has deprecated UIAutomation. Use the "XCUITest" automationName capability instead. (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 1.00 seconds
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: host: 'HeminWon-Extranet.local', ip: '192.168.15.55', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.12.4', java.version: '1.8.0_91'
Driver info: io.appium.java_client.ios.IOSDriver
    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.ErrorHandler.createThrowable(ErrorHandler.java:206)
    at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:678)
    at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:40)
    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:249)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:131)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:144)
    at io.appium.java_client.DefaultGenericMobileDriver.<init>(DefaultGenericMobileDriver.java:36)
    at io.appium.java_client.AppiumDriver.<init>(AppiumDriver.java:114)
    at io.appium.java_client.AppiumDriver.<init>(AppiumDriver.java:132)
    at io.appium.java_client.ios.IOSDriver.<init>(IOSDriver.java:82)
    at com.xueqiu.qa.appcrawler.AppiumClient.appium(AppiumClient.scala:168)
    at com.xueqiu.qa.appcrawler.AppiumClient.<init>(AppiumClient.scala:42)
    at com.xueqiu.qa.appcrawler.Crawler.setupAppium(Crawler.scala:233)
    at com.xueqiu.qa.appcrawler.Crawler.start(Crawler.scala:121)
    at com.xueqiu.qa.appcrawler.AppCrawler$.startCrawl(AppCrawler.scala:313)
    at com.xueqiu.qa.appcrawler.AppCrawler$.main(AppCrawler.scala:303)
    at com.xueqiu.qa.appcrawler.AppCrawler.main(AppCrawler.scala)

共收到 8 条回复 时间 点赞

在--capability 添加 automationName=XCUITest 参数试试

A new session could not be created. Details: Appium's IosDriver does not support xcode version 8.3.2. Apple has deprecated UIAutomation. Use the "XCUITest" automationName capability instead.

你把错误信息里面的这句话翻译下就行了. 问这个问题的人太多了

新报一个问题错误 我使用的手机是 iOS 10.0 的却提示
···
Error: Platform version must be 9.3 or above. '9.2' is not supported.
···
以下是完整日志

HeminWon-Extranet:appcrawler Hm$ java -jar appcrawler-2.0.0.jar --capability udid=059f479bdb378ac6daf95ae8e2091243259b1b73 -a EQHexinFee.ipa
2017-05-09 18:29:30 INFO [AppCrawler$.main.160] 
----------------
AppCrawler 2.0.0
app爬虫, 用于自动遍历测试. 支持Android和iOS, 支持真机和模拟器
帮助文档: http://seveniruby.gitbooks.io/appcrawler
移动测试技术交流: https://testerhome.com
感谢: 晓光 泉龙 杨榕 恒温 mikezhou yaming116
感谢提供商业支持的优秀公司: Keep
--------------------------------


2017-05-09 18:29:30 INFO [AppCrawler$.main.202] Set Platform=iOS
2017-05-09 18:29:30 INFO [AppCrawler$.main.233] app path = /Users/Hm/Desktop/appcrawler/EQHexinFee.ipa
2017-05-09 18:29:30 INFO [AppCrawler$.main.243] use default appium address 4723
2017-05-09 18:29:30 INFO [AppCrawler$.main.250] appium address = Some(http://127.0.0.1:4723/wd/hub)
2017-05-09 18:29:30 INFO [AppCrawler$.main.262] result directory = iOS_20170509182929
2017-05-09 18:29:31 INFO [Crawler.loadPlugins.76] dynamic load plugin in /Users/Hm/Desktop/plugins/
2017-05-09 18:29:33 WARN [Runtimes$.loadPlugins.84] no /Users/Hm/Desktop/plugins/ directory, skip
2017-05-09 18:29:33 INFO [Crawler.loadPlugins.78] found dynamic plugins size 0
2017-05-09 18:29:33 INFO [Crawler.apply.80] com.xueqiu.qa.appcrawler.plugin.TagLimitPlugin@56781d96
2017-05-09 18:29:33 INFO [Crawler.apply.80] com.xueqiu.qa.appcrawler.plugin.ReportPlugin@378bd86d
2017-05-09 18:29:33 INFO [Crawler.apply.80] com.xueqiu.qa.appcrawler.plugin.FreeMind@69b2f8e5
2017-05-09 18:29:33 INFO [TagLimitPlugin.init.17] com.xueqiu.qa.appcrawler.plugin.TagLimitPlugin init
2017-05-09 18:29:33 INFO [ReportPlugin.init.17] com.xueqiu.qa.appcrawler.plugin.ReportPlugin init
2017-05-09 18:29:33 INFO [FreeMind.init.17] com.xueqiu.qa.appcrawler.plugin.FreeMind init
2017-05-09 18:29:33 INFO [ReportPlugin.start.20] reportPath=/Users/Hm/Desktop/appcrawler/iOS_20170509182929
2017-05-09 18:29:33 INFO [ReportPlugin.start.23] create /Users/Hm/Desktop/appcrawler/iOS_20170509182929/tmp/ directory
2017-05-09 18:29:33 INFO [Crawler.handleCtrlC.1130] add shutdown hook
2017-05-09 18:29:33 INFO [Crawler.start.120] prepare setup Appium
2017-05-09 18:29:33 INFO [Crawler.setupAppium.232] use AppiumClient
Exception in thread "main" org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Platform version must be 9.3 or above. '9.2' is not supported. (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 2.45 seconds
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: host: 'HeminWon-Extranet.local', ip: '192.168.15.55', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.12.4', java.version: '1.8.0_91'
Driver info: io.appium.java_client.ios.IOSDriver
    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.ErrorHandler.createThrowable(ErrorHandler.java:206)
    at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:678)
    at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:40)
    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:249)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:131)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:144)
    at io.appium.java_client.DefaultGenericMobileDriver.<init>(DefaultGenericMobileDriver.java:36)
    at io.appium.java_client.AppiumDriver.<init>(AppiumDriver.java:114)
    at io.appium.java_client.AppiumDriver.<init>(AppiumDriver.java:132)
    at io.appium.java_client.ios.IOSDriver.<init>(IOSDriver.java:82)
    at com.xueqiu.qa.appcrawler.AppiumClient.appium(AppiumClient.scala:168)
    at com.xueqiu.qa.appcrawler.AppiumClient.<init>(AppiumClient.scala:42)
    at com.xueqiu.qa.appcrawler.Crawler.setupAppium(Crawler.scala:233)
    at com.xueqiu.qa.appcrawler.Crawler.start(Crawler.scala:121)
    at com.xueqiu.qa.appcrawler.AppCrawler$.startCrawl(AppCrawler.scala:313)
    at com.xueqiu.qa.appcrawler.AppCrawler$.main(AppCrawler.scala:303)
    at com.xueqiu.qa.appcrawler.AppCrawler.main(AppCrawler.scala)
HeminWon-Extranet:appcrawler Hm$ 
HeminWon-Extranet:~ Hm$ appium --platform-name iOS --platform-version 10.0.1 --automation-name XCUITest --udid 059f479bdb378ac6daf95ae8e2091243259b1b73 --session-override
[Appium] Welcome to Appium v1.6.4
[Appium] Non-default server args:
[Appium]   sessionOverride: true
[Appium]   platformName: iOS
[Appium]   platformVersion: 10.0.1
[Appium]   automationName: XCUITest
[Appium]   udid: 059f479bdb378ac6daf95ae8e2091243259b1b73
[Appium] Deprecated server args:
[Appium]   --platform-name => --default-capabilities '{"platformName":"iOS"}'
[Appium]   --platform-version => --default-capabilities '{"platformVersion":"10.0.1"}'
[Appium]   --automation-name => --default-capabilities '{"automationName":"XCUITest"}'
[Appium]   -U,--udid => --default-capabilities '{"udid":"059f479bdb378ac6daf95ae8e2091243259b1b73"}'
[Appium] Default capabilities, which will be added to each request unless overridden by desired capabilities:
[Appium]   platformName: 'iOS'
[Appium]   platformVersion: '10.0.1'
[Appium]   automationName: 'XCUITest'
[Appium]   udid: '059f479bdb378ac6daf95ae8e2091243259b1b73'
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> POST /wd/hub/session {"desiredCapabilities":{"app":"/Users/Hm/Desktop/appcrawler/EQHexinFee.ipa","appium":"http://127.0.0.1:4723/wd/hub","noReset":"false","autoLaunch":"true","platformVersion":"9.2","bundleId":"","autoWebview":"false","platformName":"iOS","udid":"059f479bdb378ac6daf95ae8e2091243259b1b73","deviceName":"iPhone 6","autoAcceptAlerts":"true"}}
[debug] [MJSONWP] Calling AppiumDriver.createSession() with args: [{"app":"/Users/Hm/Desktop/appcrawler/EQHexinFee.ipa","appium":"http://127.0.0.1:4723/wd/hub","noReset":"false","autoLaunch":"true","platformVersion":"9.2","bundleId":"","autoWebview":"false","platformName":"iOS","udid":"059f479bdb378ac6daf95ae8e2091243259b1b73","deviceName":"iPhone 6","autoAcceptAlerts":"true"},null,null,null,null]
[debug] [BaseDriver] Event 'newSessionRequested' logged at 1494325177390 (18:19:37 GMT+0800 (CST))
[Appium] Creating new XCUITestDriver (v2.27.2) session
[Appium] Capabilities:
[Appium]   app: '/Users/Hm/Desktop/appcrawler/EQHexinFee.ipa'
[Appium]   appium: 'http://127.0.0.1:4723/wd/hub'
[Appium]   noReset: 'false'
[Appium]   autoLaunch: 'true'
[Appium]   platformVersion: '9.2'
[Appium]   bundleId: ''
[Appium]   autoWebview: 'false'
[Appium]   platformName: 'iOS'
[Appium]   udid: '059f479bdb378ac6daf95ae8e2091243259b1b73'
[Appium]   deviceName: 'iPhone 6'
[Appium]   autoAcceptAlerts: 'true'
[Appium]   automationName: 'XCUITest'
[debug] [XCUITest] XCUITestDriver version: 2.27.2
[BaseDriver] Capability 'autoLaunch' changed from string to boolean. This may cause unexpected behavior
[BaseDriver] Capability 'autoWebview' changed from string to boolean. This may cause unexpected behavior
[BaseDriver] Capability 'noReset' changed from string to boolean. This may cause unexpected behavior
[BaseDriver] Capability 'autoAcceptAlerts' changed from string to boolean. This may cause unexpected behavior
[BaseDriver] The following capabilities were provided, but are not recognized by appium: appium.
[XCUITest] The capabilities 'autoAcceptAlerts' and 'autoDismissAlerts' do not work for XCUITest-based tests. Please adjust your alert handling accordingly.
[BaseDriver] Session created with session id: bd6a068a-314b-433b-8860-222287a348eb
[debug] [XCUITest] Xcode version set to '8.3.2' (tools v8.3.2.0.1.1492020469)
[debug] [XCUITest] iOS SDK Version set to '10.3'
[XCUITest] Error: Platform version must be 9.3 or above. '9.2' is not supported.
    at Error (native)
    at XCUITestDriver.start$ (../../lib/driver.js:216:13)
    at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
    at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
    at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
    at process._tickCallback (internal/process/next_tick.js:103:7)
 Error: Platform version must be 9.3 or above. '9.2' is not supported.
    at Error (native)
    at XCUITestDriver.start$ (../../lib/driver.js:216:13)
    at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
    at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
    at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
    at process._tickCallback (internal/process/next_tick.js:103:7)
[debug] [XCUITest] Not clearing log files. Use `clearSystemFiles` capability to turn on.
[MJSONWP] Encountered internal error running command: Error: Platform version must be 9.3 or above. '9.2' is not supported.
    at Error (native)
    at XCUITestDriver.start$ (../../lib/driver.js:216:13)
    at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
    at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
    at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
    at process._tickCallback (internal/process/next_tick.js:103:7)
[HTTP] <-- POST /wd/hub/session 500 3338 ms - 199 
^C[Appium] Received SIGINT - shutting down
HeminWon-Extranet:~ Hm$ appium --platform-name iOS --platform-version 10.0.1 --automation-name XCUITest --udid 059f479bdb378ac6daf95ae8e2091243259b1b73 --session-override
[Appium] Welcome to Appium v1.6.4
[Appium] Non-default server args:
[Appium]   sessionOverride: true
[Appium]   platformName: iOS
[Appium]   platformVersion: 10.0.1
[Appium]   automationName: XCUITest
[Appium]   udid: 059f479bdb378ac6daf95ae8e2091243259b1b73
[Appium] Deprecated server args:
[Appium]   --platform-name => --default-capabilities '{"platformName":"iOS"}'
[Appium]   --platform-version => --default-capabilities '{"platformVersion":"10.0.1"}'
[Appium]   --automation-name => --default-capabilities '{"automationName":"XCUITest"}'
[Appium]   -U,--udid => --default-capabilities '{"udid":"059f479bdb378ac6daf95ae8e2091243259b1b73"}'
[Appium] Default capabilities, which will be added to each request unless overridden by desired capabilities:
[Appium]   platformName: 'iOS'
[Appium]   platformVersion: '10.0.1'
[Appium]   automationName: 'XCUITest'
[Appium]   udid: '059f479bdb378ac6daf95ae8e2091243259b1b73'
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> POST /wd/hub/session {"desiredCapabilities":{"app":"/Users/Hm/Desktop/appcrawler/EQHexinFee.ipa","appium":"http://127.0.0.1:4723/wd/hub","noReset":"false","autoLaunch":"true","platformVersion":"9.2","bundleId":"","autoWebview":"false","platformName":"iOS","udid":"059f479bdb378ac6daf95ae8e2091243259b1b73","deviceName":"iPhone 6","autoAcceptAlerts":"true"}}
[debug] [MJSONWP] Calling AppiumDriver.createSession() with args: [{"app":"/Users/Hm/Desktop/appcrawler/EQHexinFee.ipa","appium":"http://127.0.0.1:4723/wd/hub","noReset":"false","autoLaunch":"true","platformVersion":"9.2","bundleId":"","autoWebview":"false","platformName":"iOS","udid":"059f479bdb378ac6daf95ae8e2091243259b1b73","deviceName":"iPhone 6","autoAcceptAlerts":"true"},null,null,null,null]
[debug] [BaseDriver] Event 'newSessionRequested' logged at 1494325528616 (18:25:28 GMT+0800 (CST))
[Appium] Creating new XCUITestDriver (v2.27.2) session
[Appium] Capabilities:
[Appium]   app: '/Users/Hm/Desktop/appcrawler/EQHexinFee.ipa'
[Appium]   appium: 'http://127.0.0.1:4723/wd/hub'
[Appium]   noReset: 'false'
[Appium]   autoLaunch: 'true'
[Appium]   platformVersion: '9.2'
[Appium]   bundleId: ''
[Appium]   autoWebview: 'false'
[Appium]   platformName: 'iOS'
[Appium]   udid: '059f479bdb378ac6daf95ae8e2091243259b1b73'
[Appium]   deviceName: 'iPhone 6'
[Appium]   autoAcceptAlerts: 'true'
[Appium]   automationName: 'XCUITest'
[debug] [XCUITest] XCUITestDriver version: 2.27.2
[BaseDriver] Capability 'autoLaunch' changed from string to boolean. This may cause unexpected behavior
[BaseDriver] Capability 'autoWebview' changed from string to boolean. This may cause unexpected behavior
[BaseDriver] Capability 'noReset' changed from string to boolean. This may cause unexpected behavior
[BaseDriver] Capability 'autoAcceptAlerts' changed from string to boolean. This may cause unexpected behavior
[BaseDriver] The following capabilities were provided, but are not recognized by appium: appium.
[XCUITest] The capabilities 'autoAcceptAlerts' and 'autoDismissAlerts' do not work for XCUITest-based tests. Please adjust your alert handling accordingly.
[BaseDriver] Session created with session id: 36a81816-9fb5-45f5-9fc7-ab9118471d38
[debug] [XCUITest] Xcode version set to '8.3.2' (tools v8.3.2.0.1.1492020469)
[debug] [XCUITest] iOS SDK Version set to '10.3'
[XCUITest] Error: Platform version must be 9.3 or above. '9.2' is not supported.
    at Error (native)
    at XCUITestDriver.start$ (../../lib/driver.js:216:13)
    at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
    at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
    at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
    at process._tickCallback (internal/process/next_tick.js:103:7)
 Error: Platform version must be 9.3 or above. '9.2' is not supported.
    at Error (native)
    at XCUITestDriver.start$ (../../lib/driver.js:216:13)
    at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
    at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
    at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
    at process._tickCallback (internal/process/next_tick.js:103:7)
[debug] [XCUITest] Not clearing log files. Use `clearSystemFiles` capability to turn on.
[MJSONWP] Encountered internal error running command: Error: Platform version must be 9.3 or above. '9.2' is not supported.
    at Error (native)
    at XCUITestDriver.start$ (../../lib/driver.js:216:13)
    at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
    at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
    at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
    at process._tickCallback (internal/process/next_tick.js:103:7)
[HTTP] <-- POST /wd/hub/session 500 2584 ms - 199 
^C[Appium] Received SIGINT - shutting down

我和楼主一个错误,Exception in thread "main" org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Platform version must be 9.3 or above. '9.2' is not supported. (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 438 milliseconds
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: host: 'junchaodeMacBook-Pro.local', ip: '192.168.21.213', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.12.5', java.version: '1.8.0_131'
Driver info: io.appium.java_client.ios.IOSDriver

appium --app /Users/junchao/Downloads/HoubankP2P.app --udid EF38E91C-88C5-4EE6-9936-C0FDEA07C241 --device-name iPhoneSimulator --platform-name ios --platform-version 10.3 --automation-name XCUITest --session-override
[Appium] Welcome to Appium v1.6.6-beta (REV c60b53818f2f264ee88b664b260390e3eb186a12)
[Appium] Non-default server args:
[Appium] sessionOverride: true
[Appium] platformName: ios
[Appium] platformVersion: 10.3
[Appium] automationName: XCUITest
[Appium] deviceName: iPhoneSimulator
[Appium] app: /Users/junchao/Downloads/HoubankP2P.app
[Appium] udid: EF38E91C-88C5-4EE6-9936-C0FDEA07C241
[Appium] Deprecated server args:
[Appium] --platform-name => --default-capabilities '{"platformName":"ios"}'
[Appium] --platform-version => --default-capabilities '{"platformVersion":"10.3"}'
[Appium] --automation-name => --default-capabilities '{"automationName":"XCUITest"}'
[Appium] --device-name => --default-capabilities '{"deviceName":"iPhoneSimulator"}'
[Appium] --app => --default-capabilities '{"app":"/Users/junchao/Downloads/HoubankP2P.app"}'
[Appium] -U,--udid => --default-capabilities '{"udid":"EF38E91C-88C5-4EE6-9936-C0FDEA07C241"}'
[Appium] Default capabilities, which will be added to each request unless overridden by desired capabilities:
[Appium] platformName: 'ios'
[Appium] platformVersion: '10.3'
[Appium] automationName: 'XCUITest'
[Appium] deviceName: 'iPhoneSimulator'
[Appium] app: '/Users/junchao/Downloads/HoubankP2P.app'
[Appium] udid: 'EF38E91C-88C5-4EE6-9936-C0FDEA07C241'
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> POST /wd/hub/session {"desiredCapabilities":{"app":"/Users/junchao/Downloads/HoubankP2P.ipa","appium":"http://127.0.0.1:4723/wd/hub,noReset:false,bundleId:,deviceName:iPhone" 6","autoLaunch":"true","platformVersion":"9.2","automationName":"XCUITest","autoWebview":"false","platformName":"iOS","udid":"EF38E91C-88C5-4EE6-9936-C0FDEA07C241","autoAcceptAlerts":"true"}}
[debug] [MJSONWP] Calling AppiumDriver.createSession() with args: [{"app":"/Users/junchao/Downloads/HoubankP2P.ipa","appium":"http://127.0.0.1:4723/wd/hub,noReset:false,bundleId:,deviceName:iPhone" 6","autoLaunch":"true","platformVersion":"9.2","automationName":"XCUITest","autoWebview":"false","platformName":"iOS","udid":"EF38E91C-88C5-4EE6-9936-C0FDEA07C241","autoAcceptAlerts":"true"},null,null]
[debug] [BaseDriver] Event 'newSessionRequested' logged at 1500532365583 (14:32:45 GMT+0800 (CST))
[Appium] Creating new XCUITestDriver (v2.36.0) session
[Appium] Capabilities:
[Appium] app: '/Users/junchao/Downloads/HoubankP2P.ipa'
[Appium] appium: 'http://127.0.0.1:4723/wd/hub'
[Appium] noReset: 'false'
[Appium] bundleId: ''
[Appium] deviceName: 'iPhone 6'
[Appium] autoLaunch: 'true'
[Appium] platformVersion: '9.2'
[Appium] automationName: 'XCUITest'
[Appium] autoWebview: 'false'
[Appium] platformName: 'iOS'
[Appium] udid: 'EF38E91C-88C5-4EE6-9936-C0FDEA07C241'
[Appium] autoAcceptAlerts: 'true'
[debug] [XCUITest] XCUITestDriver version: 2.36.0
[BaseDriver] Capability 'autoLaunch' changed from string to boolean. This may cause unexpected behavior
[BaseDriver] Capability 'autoWebview' changed from string to boolean. This may cause unexpected behavior
[BaseDriver] Capability 'noReset' changed from string to boolean. This may cause unexpected behavior
[BaseDriver] Capability 'autoAcceptAlerts' changed from string to boolean. This may cause unexpected behavior
[BaseDriver] The following capabilities were provided, but are not recognized by appium: appium.
[XCUITest] The capabilities 'autoAcceptAlerts' and 'autoDismissAlerts' do not work for XCUITest-based tests. Please adjust your alert handling accordingly.
[BaseDriver] Session created with session id: 66ef4060-aa40-4b98-ab9f-cc4985d2464b
[debug] [XCUITest] Xcode version set to '8.3.3' (tools v8.3.2.0.1.1492020469)
[debug] [XCUITest] iOS SDK Version set to '10.3'
[XCUITest] Error: Platform version must be 9.3 or above. '9.2' is not supported.
at XCUITestDriver.start$ (../../lib/driver.js:233:13)
at tryCatch (/Users/junchao/Documents/appium/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke as _invoke
at GeneratorFunctionPrototype.prototype.(anonymous function) as next
at GeneratorFunctionPrototype.invoke (/Users/junchao/Documents/appium/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at
at process._tickCallback (internal/process/next_tick.js:169:7)
Error: Platform version must be 9.3 or above. '9.2' is not supported.
at XCUITestDriver.start$ (../../lib/driver.js:233:13)
at tryCatch (/Users/junchao/Documents/appium/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke as _invoke
at GeneratorFunctionPrototype.prototype.(anonymous function) as next
at GeneratorFunctionPrototype.invoke (/Users/junchao/Documents/appium/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at
at process._tickCallback (internal/process/next_tick.js:169:7)
[debug] [XCUITest] Not clearing log files. Use clearSystemFiles capability to turn on.
[MJSONWP] Encountered internal error running command: Error: Platform version must be 9.3 or above. '9.2' is not supported.
at XCUITestDriver.start$ (../../lib/driver.js:233:13)
at tryCatch (/Users/junchao/Documents/appium/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke as _invoke
at GeneratorFunctionPrototype.prototype.(anonymous function) as next
at GeneratorFunctionPrototype.invoke (/Users/junchao/Documents/appium/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at
at process._tickCallback (internal/process/next_tick.js:169:7)
[HTTP] <-- POST /wd/hub/session 500 254 ms - 199

我启动 appium 设置 appium --app /Users/junchao/Downloads/HoubankP2P.app --udid EF38E91C-88C5-4EE6-9936-C0FDEA07C241 --device-name iPhoneSimulator --platform-name ios --platform-version 10.3 --automation-name XCUITest --session-override
下面就自动变成:[Appium] Creating new XCUITestDriver (v2.36.0) session
[Appium] Capabilities:
[Appium] app: '/Users/junchao/Downloads/HoubankP2P.ipa'
[Appium] appium: 'http://127.0.0.1:4723/wd/hub'
[Appium] noReset: 'false'
[Appium] bundleId: ''
[Appium] deviceName: 'iPhone 6'
[Appium] autoLaunch: 'true'
[Appium] platformVersion: '9.2'
[Appium] automationName: 'XCUITest'
[Appium] autoWebview: 'false'
[Appium] platformName: 'iOS'
[Appium] udid: 'EF38E91C-88C5-4EE6-9936-C0FDEA07C241'
[Appium] autoAcceptAlerts: 'true'

这和我设置不一样啊 这个有 bug 每次都自己跳转到默认值

我也不知道怎么用,我现在想在 windows 下跑下安卓的,无从下手。

在 windows 下跑安卓的是怎么做,能有个简单的步骤说明吗?不知道怎么下手。

请问有在 iPhone 上跑成功的吗?

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