我有一个真正的设备(Ipad Mini)连接到我的Mac Book Pro。随着我试图测试已经安装在Ipad Mini上的应用程序。 我在启动服务器后尝试运行Appium检查器。但遗憾的是,Appium Inspector正在尝试安装应用程序,但失败了。它不只是使用已提供的软件包ID,而是继续打开应用程序,而不是尝试使用空白应用程序路径安装它。
我想知道如何正确设置?
以下是错误的日志:
info: --> POST /wd/hub/session {"desiredCapabilities":{"platformName":"iOS","platformVersion":"8.4","newCommandTimeout":"999999","automationName":"Appium","deviceName":"iPad Mini"}}
info: Client User-Agent string: Appium (unknown version) CFNetwork/720.5.7 Darwin/14.5.0 (x86_64)
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: **** NEW SESSION ***
info: **** NEW SESSION ***
info: **** NEW SESSION ***
info: **** NEW SESSION ***
info: **** NEW SESSION ***
info: **** NEW SESSION ***
info: **** NEW SESSION ***
info: **** NEW SESSION ***
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: [debug] App is an iOS bundle, will attempt to run as pre-existing
info: [debug] Creating new appium session 3336a71d-7695-44fb-9ee2-eaacae01c4bd
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 /Applications/Appium.app/Contents/Resources/node_modules/appium/com.xxxxxxxxx/en.lproj/Localizable.strings
info: Will try to parse the plist file as XML
info: [debug] Could not parse plist file (as XML) at /Applications/Appium.app/Contents/Resources/node_modules/appium/com.xxxxxxxxxx/en.lproj/Localizable.strings
warn: Could not parse app Localizable.strings assuming it doesn't exist
info: [debug] Creating instruments
info: [debug] Preparing uiauto bootstrap
info: [debug] Dynamic bootstrap dir: /Users/rj2501511/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/rj2501511/Library/Application Support/appium/bootstrap/bootstrap-5923cadea0343e3f.js
info: [debug] Reusing dynamic bootstrap: /Users/rj2501511/Library/Application Support/appium/bootstrap/bootstrap-5923cadea0343e3f.js
info: [debug] Attempting iOS device log capture via libimobiledevice idevicesyslog
info: [debug] Creating iDevice object with udid xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
info: [debug] App is not installed. Will try to install the app.
info: [debug] Cleaning up appium session
info: [debug] Error: Installing com.xxxxxxxxxx failed
at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/node-idevice/main.js:159:6
at ChildProcess.exithandler (child_process.js:742:7)
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:1015:16)
at Socket.<anonymous> (child_process.js:1183:11)
at Socket.emit (events.js:107:17)
at Pipe.close (net.js:485:12)
error: Failed to start an Appium session, err was: Error: Installing com.xxxxxxxxx failed
info: [debug] Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: Installing com.xxxxxxxx failed)","origValue":"Installing com.xxxxxxx failed"},"sessionId":null}
info: <-- POST /wd/hub/session 500 3264.173 ms - 192
Appium Server的设置:
使用Appium用户界面我填写了以下内容:
BundleID: com.xxx.xxxx.xxxx
Force Device: Ipad Mini
Platform Version: 8.4
UDID: xxxxxxxxxxxxxxxxxxx
Show Simulator Log: checked
然后我点击&#34;启动&#34;
继续启动Appium服务器生成以下日志:
info: Welcome to Appium v1.4.13 (REV c75d8adcb66a75818a542fe1891a34260c21f76a)
info: Appium REST http interface listener started on 127.0.0.1:4723
info: [debug] Non-default server args: {"app":"com.xxxxxxxxx","udid":"xxxxxxxxxxxxxxxxxxxxxxxxxxxx","address":"127.0.0.1","deviceName":"iPad Mini","platformName":"iOS","platformVersion":"8.4","showIOSLog":true,"defaultCommandTimeout":7200,"debugLogSpacing":true}
info: Console LogLevel: debug
info: --> GET /wd/hub/status {}
info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.4.13","revision":"c75d8adcb66a75818a542fe1891a34260c21f76a"}}}
info: <-- GET /wd/hub/status 200 6.923 ms - 105 {"status":0,"value":{"build":{"version":"1.4.13","revision":"c75d8adcb66a75818a542fe1891a34260c21f76a"}}}
info: --> GET /wd/hub/status {}
所以服务器启动正常。
答案 0 :(得分:1)
所以,我做了什么:
通过大量的文档和阅读,我发现基本要求是:
1) app - .ipa或.app文件的绝对路径
2) udid - 用于实际设备自动化的设备
3) deviceName - 这可能是任何东西,它只是不能为空值
我试图使用bundleId而不是app路径。想一想如果我在设备上安装了应用程序,我可以在启动appium检查器时使用bundleId。这不能解决上述错误。
所以我切换到app并使用了绝对路径。 Appium会首先将应用程序安装到我的设备上,并且appium检查员能够启动。