if AppiumInit.driver is None:
config = {}
# 指定测试平台
config['platformName'] = 'ios'
config['browserName'] = ''
# 指定测试机器的系统版本号
config['platformVersion'] = '6.0.1'
config['deviceName'] = 'iPhone Retina 4-inch'
# 待测试应用的相对路径
config['app'] = PATH('./PhotoWonder.ipa')
error: Could not find a device to launch. You requested 'iPhone Retina (4-inch) - Simulator - iOS 6.0.1', but the available devices were: ["iPhone - Simulator - iOS 7.1","iPhone Retina (3.5-inch) - Simulator - iOS 7.1","iPhone Retina (4-inch) - Simulator - iOS 7.1","iPhone Retina (4-inch 64-bit) - Simulator - iOS 7.1","iPad - Simulator - iOS 7.1","iPad Retina - Simulator - iOS 7.1","iPad Retina (64-bit) - Simulator - iOS 7.1"]
info: Cleaning up appium session
error: Failed to start an Appium session, err was: Error: Could not find a device to launch. You requested 'iPhone Retina (4-inch) - Simulator - iOS 6.0.1', but the available devices were: ["iPhone - Simulator - iOS 7.1","iPhone Retina (3.5-inch) - Simulator - iOS 7.1","iPhone Retina (4-inch) - Simulator - iOS 7.1","iPhone Retina (4-inch 64-bit) - Simulator - iOS 7.1","iPad - Simulator - iOS 7.1","iPad Retina - Simulator - iOS 7.1","iPad Retina (64-bit) - Simulator - iOS 7.1"]
info: Error: Could not find a device to launch. You requested 'iPhone Retina (4-inch) - Simulator - iOS 6.0.1', but the available devices were: ["iPhone - Simulator - iOS 7.1","iPhone Retina (3.5-inch) - Simulator - iOS 7.1","iPhone Retina (4-inch) - Simulator - iOS 7.1","iPhone Retina (4-inch 64-bit) - Simulator - iOS 7.1","iPad - Simulator - iOS 7.1","iPad Retina - Simulator - iOS 7.1","iPad Retina (64-bit) - Simulator - iOS 7.1"]
at null. (/usr/local/lib/node_modules/appium/lib/devices/ios/ios.js:860:19)
at /usr/local/lib/node_modules/appium/node_modules/appium-instruments/lib/instruments.js:445:7
at ChildProcess.exithandler (child_process.js:645:7)
at ChildProcess.emit (events.js:98:17)
at maybeClose (child_process.js:755:16)
at Socket. (child_process.js:968:11)
at Socket.emit (events.js:95:17)
at Pipe.close (net.js:465:12)
info: Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: Could not find a device to launch. You requested 'iPhone Retina (4-inch) - Simulator - iOS 6.0.1', but the available devices were: [\"iPhone - Simulator - iOS 7.1\",\"iPhone Retina (3.5-inch) - Simulator - iOS 7.1\",\"iPhone Retina (4-inch) - Simulator - iOS 7.1\",\"iPhone Retina (4-inch 64-bit) - Simulator - iOS 7.1\",\"iPad - Simulator - iOS 7.1\",\"iPad Retina - Simulator - iOS 7.1\",\"iPad Retina (64-bit) - Simulator - iOS 7.1\"])","origValue":"Could not find a device to launch. You requested 'iPhone Retina (4-inch) - Simulator - iOS 6.0.1', but the available devices were: [\"iPhone - Simulator - iOS 7.1\",\"iPhone Retina (3.5-inch) - Simulator - iOS 7.1\",\"iPhone Retina (4-inch) - Simulator - iOS 7.1\",\"iPhone Retina (4-inch 64-bit) - Simulator - iOS 7.1\",\"iPad - Simulator - iOS 7.1\",\"iPad Retina - Simulator - iOS 7.1\",\"iPad Retina (64-bit) - Simulator - iOS 7.1\"]"},"sessionId":null}
POST /wd/hub/session 500 7373ms - 1kb