• Appium iOS 简易配置 at 2016年07月16日

    楼主你是用什么编辑器编写 python 脚本

  • 😭 还是没解决问题,楼主可以加我 Q 吗 441079060😭

  • #114 楼 @lihuazhang 装了,现在时报这个

    [Appium] Appium REST http interface listener started on 0.0.0.0:4723

    [HTTP] --> GET /wd/hub/status {}

    [MJSONWP] Calling AppiumDriver.getStatus() with args: []

    [MJSONWP] Responding to client with driver.getStatus() result: {"build":{"version":"1.5.3"...

    [HTTP] <-- GET /wd/hub/status 200 25 ms - 83

    [HTTP] --> GET /wd/hub/status {}

    [MJSONWP] Calling AppiumDriver.getStatus() with args: []

    [MJSONWP] Responding to client with driver.getStatus() result: {"build":{"version":"1.5.3"...
    [HTTP] <-- GET /wd/hub/status 200 8 ms - 83

    [HTTP] --> GET /wd/hub/status {}

    [MJSONWP] Calling AppiumDriver.getStatus() with args: []

    [MJSONWP] Responding to client with driver.getStatus() result: {"build":{"version":"1.5.3"...
    [HTTP] <-- GET /wd/hub/status 200 8 ms - 83
    [HTTP] --> GET /wd/hub/sessions {}

    [BaseDriver] SessionNotCreatedError: A new session could not be created. Details: The desiredCapabilities object was not valid for the following reason(s): deviceName can't be blank.
    at IosDriver.validateDesiredCaps (lib/basedriver/driver.js:120:25)
    at IosDriver.validateDesiredCaps (lib/driver.js:40:16)
    at IosDriver.callee$0$0$ (lib/basedriver/commands/session.js:14:8)
    at tryCatch (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
    at GeneratorFunctionPrototype.invoke as _invoke
    at GeneratorFunctionPrototype.prototype.(anonymous function) as next
    at invoke (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
    at enqueueResult (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:185:17)
    at new Promise (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/node_modules/core-js/library/modules/es6.promise.js:197:7)
    at AsyncIterator.enqueue (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:184:12)
    at AsyncIterator.prototype.(anonymous function) as next
    at Object.runtime.async (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:209:12)
    at IosDriver.callee$0$0 as createSession
    at IosDriver.createSession$ (lib/driver.js:40:16)
    at tryCatch (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
    at GeneratorFunctionPrototype.invoke as _invoke
    at GeneratorFunctionPrototype.prototype.(anonymous function) as next
    at invoke (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
    at enqueueResult (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:185:17)
    at new Promise (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/node_modules/core-js/library/modules/es6.promise.js:197:7)
    at AsyncIterator.enqueue (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:184:12)
    at AsyncIterator.prototype.(anonymous function) as next
    at Object.runtime.async (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:209:12)
    at IosDriver.createSession (lib/driver.js:110:19)
    at AppiumDriver.createSession$ (lib/appium.js:121:43)
    at tryCatch (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
    at GeneratorFunctionPrototype.invoke as _invoke
    at GeneratorFunctionPrototype.prototype.(anonymous function) as next
    at invoke (/Applications/Appium.app/
    [HTTP] <-- POST /wd/hub/session 500 64 ms - 198

    Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
    at enqueueResult (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:185:17)
    at new Promise (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/node_modules/core-js/library/modules/es6.promise.js:197:7)
    at AsyncIterator.enqueue (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:184:12)
    at AsyncIterator.prototype.(anonymous function) as next
    at Object.runtime.async (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:209:12)
    { [SessionNotCreatedError: A new session could not be created. Details: The desiredCapabilities object was not valid for the following reason(s): deviceName can't be blank.] jsonwpCode: 33 }

    [HTTP] --> GET /wd/hub/status {}

    [MJSONWP] Calling AppiumDriver.getStatus() with args: []

    [MJSONWP] Responding to client with driver.getStatus() result: {"build":{"version":"1.5.3"...
    [HTTP] <-- GET /wd/hub/status 200 8 ms - 83

    [HTTP] --> GET /wd/hub/status {}

    [MJSONWP] Calling AppiumDriver.getStatus() with args: []

    [MJSONWP] Responding to client with driver.getStatus() result: {"build":{"version":"1.5.3"...
    [HTTP] <-- GET /wd/hub/status 200 8 ms - 83

    [HTTP] --> GET /wd/hub/status {}

    [MJSONWP] Calling AppiumDriver.getStatus() with args: []

    [MJSONWP] Responding to client with driver.getStatus() result: {"build":{"version":"1.5.3"...

    [HTTP] <-- GET /wd/hub/status 200 150 ms - 83

    [HTTP] --> GET /wd/hub/status {}

    [MJSONWP] Calling AppiumDriver.getStatus() with args: []

    [MJSONWP] Responding to client with driver.getStatus() result: {"build":{"version":"1.5.3"...
    [HTTP] <-- GET /wd/hub/status 200 19 ms - 83

    [HTTP] --> GET /wd/hub/status {}

    [MJSONWP] Calling AppiumDriver.getStatus() with args: []

    [MJSONWP] Responding to client with driver.getStatus() result: {"build":{"version":"1.5.3"...
    [HTTP] <-- GET /wd/hub/status 200 7 ms - 83

    [HTTP] --> GET /wd/hub/status {}

    [MJSONWP] Calling AppiumDriver.getStatus() with args: []

    [MJSONWP] Responding to client with driver.getStatus() result: {"build":{"version":"1.5.3"...
    [HTTP] <-- GET /wd/hub/status 200 9 ms - 83

    [HTTP] --> GET /wd/hub/status {}

    [MJSONWP] Calling AppiumDriver.getStatus() with args: []
    [MJSONWP] Responding to client with driver.getStatus() result: {"build":{"version":"1.5.3"...
    [HTTP] <-- GET /wd/hub/status 200 8 ms - 83

    [HTTP] --> GET /wd/hub/status {}

    [MJSONWP] Calling AppiumDriver.getStatus() with args: []
    [MJSONWP] Responding to client with driver.getStatus() result: {"build":{"version":"1.5.3"...
    [HTTP] <-- GET /wd/hub/status 200 8 ms - 83

  • 楼主我真机启动不了,Could Not Launch Appium Inspector
    Could not start a new session

    Be sure the Appium server is running with an application opened by using the "App Path" parameter in Appium.app (along with package and activity for Android) or by connecting with selenium client and supplying this in the desired capabilities object.
    能帮忙解决下吗

  • info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.4.13","revision":"c75d8adcb66a75818a542fe1891a34260c21f76a"},"isShuttingDown":false}}
    info: <-- GET /wd/hub/status 200 0.721 ms - 128 {"status":0,"value":{"build":{"version":"1.4.13","revision":"c75d8adcb66a75818a542fe1891a34260c21f76a"},"isShuttingDown":false}}

    info: [debug] /Users/kugou/Downloads/KugouFM_V4.3.0_4310.ipa copied to /var/folders/26/m53drpcd2ms2_8lw_9fmxnsw0000gn/T/11669-42631-qhe416/appium-app.zip

    info: [debug] Unzipping /var/folders/26/m53drpcd2ms2_8lw_9fmxnsw0000gn/T/11669-42631-qhe416/appium-app.zip

    info: [debug] Testing zip archive: /var/folders/26/m53drpcd2ms2_8lw_9fmxnsw0000gn/T/11669-42631-qhe416/appium-app.zip

    info: [debug] Zip archive tested clean

    info: [debug] Unzip successful

    info: [debug] Using locally extracted app: /var/folders/26/m53drpcd2ms2_8lw_9fmxnsw0000gn/T/11669-42631-qhe416/Payload/KugouFM.app

    info: [debug] Creating new appium session dc30a0f2-d8cc-4f6b-a124-0c228be27f00

    info: [debug] Removing any remaining instruments sockets

    info: [debug] Cleaned up instruments socket /tmp/instruments_sock

    info: [debug] Auto-detecting iOS udid...
    info: [debug] Not auto-detecting udid, running on sim
    info: [debug] Could not parse plist file (as binary) at /var/folders/26/m53drpcd2ms2_8lw_9fmxnsw0000gn/T/11669-42631-qhe416/Payload/KugouFM.app/en.lproj/Localizable.strings
    info: Will try to parse the plist file as XML

    info: [debug] Could not parse plist file (as XML) at /var/folders/26/m53drpcd2ms2_8lw_9fmxnsw0000gn/T/11669-42631-qhe416/Payload/KugouFM.app/en.lproj/Localizable.strings
    warn: Could not parse app Localizable.strings assuming it doesn't exist
    info: [debug] Getting bundle ID from app
    info: [debug] Parsed app Info.plist (as binary)
    info: [debug] Creating instruments
    info: [debug] Preparing uiauto bootstrap
    info: [debug] Dynamic bootstrap dir: /Users/kugou/Library/Application Support/appium/bootstrap
    info: [debug] Dynamic env: {"nodePath":"/Applications/Appium.app/Contents/Resources/node/bin/node","commandProxyClientPath":"/Applications/Appium.app/Contents/Resources/node_modules/appium/submodules/appium-uiauto/bin/command-proxy-client.js","instrumentsSock":"/tmp/instruments_sock","interKeyDelay":null,"justLoopInfinitely":false,"autoAcceptAlerts":false,"autoDismissAlerts":false,"sendKeyStrategy":"grouped"}

    info: [debug] Dynamic bootstrap code: // This file is automatically generated. Do not manually modify!
    ...

    info: [debug] Dynamic bootstrap path: /Users/kugou/Library/Application Support/appium/bootstrap/bootstrap-5923cadea0343e3f.js

    info: [debug] Creating or overwritting dynamic bootstrap: /Users/kugou/Library/Application Support/appium/bootstrap/bootstrap-5923cadea0343e3f.js
    info: [debug] Attempting iOS device log capture via libimobiledevice idevicesyslog

    warn: Could not capture device log using libimobiledevice idevicesyslog. Libimobiledevice probably isn't installed

    info: [debug] Attempting iOS device log capture via deviceconsole

    info: [debug] Creating iDevice object with udid c1f8cf0852df08d72a92d7ee019324bf2519e106

    info: [debug] Couldn't find ideviceinstaller, trying built-in at /Applications/Appium.app/Contents/Resources/node_modules/appium/build/libimobiledevice-macosx/ideviceinstaller

    error: Could not initialize ideviceinstaller; make sure it is installed and works on your system

    info: [debug] Cleaning up appium session

    error: Failed to start an Appium session, err was: Error: Could not initialize ideviceinstaller; make sure it is installed and works on your system

    info: [debug] Error: Could not initialize ideviceinstaller; make sure it is installed and works on your system
    at [object Object].IOS.getIDeviceObj (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/ios/ios.js:909:13)
    at [object Object].IOS.installToRealDevice (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/ios/ios.js:856:32)
    at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/async/lib/async.js:607:21
    at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/async/lib/async.js:246:17
    at iterate (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/async/lib/async.js:146:13)
    at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/async/lib/async.js:157:25
    at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/async/lib/async.js:248:21
    at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/async/lib/async.js:612:34
    at [object Object]. (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/ios/ios-crash-log.js:52:5)
    at [object Object]. (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/ios/ios-crash-log.js:27:5)
    at f (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/glob/node_modules/once/once.js:17:25)
    at Glob. (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/glob/glob.js:131:7)
    at Glob.emit (events.js:107:17)
    at Glob._finish (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/glob/glob.js:168:8)
    at done (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/glob/glob.js:157:12)
    at Glob._processReaddir2 (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/glob/glob.js:351:12)
    at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/glob/glob.js:288:17
    at RES (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/glob/node_modules/inflight/inflight.js:23:14)
    at f (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/glob/node_modules/once/once.js:17:25)
    at Glob._readdirEntries (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/glob/glob.js:480:10)
    at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/glob/glob.js:457:12
    at FSReqWrap.oncomplete (fs.js:95:15)

    info: [debug] Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: Could not initialize ideviceinstaller; make sure it is installed and works on your system)","origValue":"Could not initialize ideviceinstaller; make sure it is installed and works on your system"},"sessionId":null}
    info: <-- POST /wd/hub/session 500 4938.839 ms - 300


  • 请问这个是什么原因

  • 楼主我也遇到 inspector 打不开,你说要把 device console 复制到相应的路径,我想问下怎么找到 device console 这个文件😭