在运行用于自动化移动应用程序测试的Appium应用程序时遇到问题
以下是我使用的工具版本
Appium版本:1.2.1
Xcode:5.1.1
以下是我正在执行的步骤,
服务器地址:127.0.0.1,端口:4723
当我点击“启动”按钮时,一切似乎都还好。
当我点击“检查器”按钮,然后显示以下错误时,
无法启动Appium检查器
无法开始新的会话
确保通过使用Appium.app中的“App Path”参数(以及Android的包和 Activity )或通过与selenium客户端连接并在所需的功能对象中提供它,来使Appium服务器在打开的应用程序下运行。
在Appium控制台中,出现以下错误,
2014-08-21T17:57:57.789Z - info: --> POST /wd/hub/session {"desiredCapabilities":{"platformName":"iOS","platformVersion":"7.1","newCommandTimeout":"999999","automationName":"Appium"}}
2014-08-21T17:57:57.792Z - info: <-- POST /wd/hub/session 500 3.235 ms - 286
2014-08-21T17:57:57.772Z - debug: Request received with params: {}
2014-08-21T17:57:57.772Z - debug: Responding to client with success: {"status":0,"value":{"build":{"version":"1.2.0","revision":"e53f49c706a25242e66d36685c268b599cc18da5"}}}
2014-08-21T17:57:57.775Z - debug: Appium request initiated at /wd/hub/sessions
2014-08-21T17:57:57.775Z - debug: Request received with params: {}
2014-08-21T17:57:57.775Z - debug: Responding to client with success: {"status":0,"value":[]}
2014-08-21T17:57:57.789Z - debug: Appium request initiated at /wd/hub/session
2014-08-21T17:57:57.789Z - debug: Request received with params: {"desiredCapabilities":{"platformName":"iOS","platformVersion":"7.1","newCommandTimeout":"999999","automationName":"Appium"}}
2014-08-21T17:57:57.790Z - error: The following desired capabilities are required, but were not provided: deviceName
2014-08-21T17:57:57.790Z - debug: Got configuration error, not starting session
2014-08-21T17:57:57.791Z - debug: Cleaning up appium session
2014-08-21T17:57:57.791Z - error: Failed to start an Appium session, err was: Error: The following desired capabilities are required, but were not provided: deviceName
2014-08-21T17:57:57.791Z - debug: Error: The following desired capabilities are required, but were not provided: deviceName
at Capabilities.checkValidity (/Volumes/Appium/Appium.app/Contents/Resources/node_modules/appium/lib/server/capabilities.js:120:13)
at Appium.configure (/Volumes/Appium/Appium.app/Contents/Resources/node_modules/appium/lib/appium.js:256:35)
at Appium.start (/Volumes/Appium/Appium.app/Contents/Resources/node_modules/appium/lib/appium.js:100:10)
at Object.exports.createSession [as handle] (/Volumes/Appium/Appium.app/Contents/Resources/node_modules/appium/lib/server/controller.js:159:16)
at next_layer (/Volumes/Appium/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:103:13)
at Route.dispatch (/Volumes/Appium/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:107:5)
at /Volumes/Appium/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:213:24
at Function.proto.process_params (/Volumes/Appium/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:286:12)
at next (/Volumes/Appium/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:207:19)
at next (/Volumes/Appium/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:182:38)
2014-08-21T17:57:57.791Z - debug: Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: The following desired capabilities are required, but were not provided: deviceName)","origValue":"The following desired capabilities are required, but were not provided: deviceName"},"sessionId":null}
2014-08-21T17:58:08.130Z - info: --> GET /wd/hub/status {}
—————————————————
When Launching with ‘Prelaunch Application’:Enabled, got following errors
2014-08-21T18:00:55.417Z - debug: Attempting to retry launching instruments, this is retry #3
2014-08-21T18:00:55.418Z - debug: Killall iPhoneSimulator
2014-08-21T18:01:00.420Z - info: Launching instruments
2014-08-21T18:01:00.421Z - debug: Attempting to run app on iPhone Retina (4-inch) - Simulator - iOS 7.1
2014-08-21T18:01:00.422Z - debug: Spawning instruments with command: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate -w iPhone Retina (4-inch) - Simulator - iOS 7.1 /Users/umairrashid/Library/Application Support/iPhone Simulator/7.1/Applications/878133B5-7078-4E92-B3A2-607A3A3C2AC3/Recipes.app -e UIASCRIPT /Users/umairrashid/Library/Application Support/appium/bootstrap/bootstrap-7a459bb511e03f3b.js -e UIARESULTSPATH /tmp/appium-instruments
2014-08-21T18:01:00.422Z - debug: And extra without-delay env: {"DYLD_INSERT_LIBRARIES":"/Volumes/Appium/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd/InstrumentsShim.dylib","LIB_PATH":"/Volumes/Appium/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd"}
2014-08-21T18:01:00.422Z - debug: And launch timeouts (in ms): {"global":90000}
2014-08-21T18:01:01.415Z - debug: [INST STDERR] Instruments Usage Error : Could not remove existing output document 'file:///Volumes/Appium/Appium.app/Contents/Resources/node_modules/appium/instrumentscli0.trace': Error Domain=NSCocoaErrorDomain Code=642 "You can’t save the file “instrumentscli0.trace” because the volume “Appium” is read only." UserInfo=0x7fac5e2d6100 {NSFilePath=/Volumes/Appium/Appium.app/Contents/Resources/node_modules/appium/instrumentscli0.trace, NSUnderlyingError=0x7fac5d92d760 "The operation couldn’t be completed. Read-only file system"}.
2014-08-21T18:01:01.483Z - debug: [INSTSERVER] Instruments exited with code 254
2014-08-21T18:01:01.483Z - debug: Killall instruments
2014-08-21T18:01:01.486Z - debug: Instruments crashed on startup
在这里,我期望当我单击Appium中的“检查”按钮时,将启动Simulator,并且可以在该视图中看到XPaths等。
最佳答案
如果您仍然有问题,最好将自己的appium gui屏幕截图并张贴在此处,以便我提供更多帮助
关于ios - 需要Appium帮助:模拟器无法从Appium.app启动应用程序,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/25433841/