问题已经不出现了:
但是不知道怎么好了,iPhone6、iPhone5 交叉着跑了几次就可以了
现在这样的配置都可以起来了,无语!!
desired_caps['deviceName'] = 'iPhone 6'
desired_caps['platformVersion'] = '8.1'
# desired_caps['udid'] = 'ffe172abe71bcc02755cb9584dff3eaa126bd203' # iphone 6
# desired_caps['deviceName'] = 'iPhone 5'
# desired_caps['platformVersion'] = '7.1'
desired_caps['udid'] = 'ff68a9c7db8d72b8ab2f8359a644c34d9d56bc87' # iphone 5
使用 appium 对 iOS 进行测试,测试 iOS8 系统的 iPhone 时能正常执行脚本跑 case。
但是换成 iOS7 系统的手机后,无法启动测试 app,appium server 输出了如下 log:
[36minfo[39m: Welcome to Appium v1.4.10 (REV c97e824665ae82df682a0b540b38dfe8c13c8ac7)
[36minfo[39m: Appium REST http interface listener started on 0.0.0.0:4723
[36minfo[39m: Console LogLevel: debug
[36minfo[39m: [37m-->[39m [37mPOST[39m [37m/wd/hub/session[39m [90m{"desiredCapabilities":{"udid":"ff68a9c7db8d72b8ab2f8359a644c34d9d56bc87","appium-version":"1.4.10","app":"/Users/smzdm/Documents/svn/iphone/iPhone5.10/build/Debug-iphoneos/SMZDM.app","platformName":"iOS","deviceName":"iPhone 5"}}[39m
[36minfo[39m: Client User-Agent string: Python-urllib/2.7
[36minfo[39m: [debug] The following desired capabilities were provided, but not recognized by appium. They will be passed on to any other services running on this server. : appium-version
[36minfo[39m: [debug] Using local app from desired caps: /Users/smzdm/Documents/svn/iphone/iPhone5.10/build/Debug-iphoneos/SMZDM.app
[36minfo[39m: [debug] Creating new appium session 7ad3c74e-10d2-4bfd-aafa-c2e215266fc5
[36minfo[39m: [debug] Removing any remaining instruments sockets
[36minfo[39m: [debug] Cleaned up instruments socket /tmp/instruments_sock
[36minfo[39m: [debug] Auto-detecting iOS udid...
[36minfo[39m: [debug] Not auto-detecting udid, running on sim
[36minfo[39m: [debug] Could not parse plist file (as binary) at /Users/smzdm/Documents/svn/iphone/iPhone5.10/build/Debug-iphoneos/SMZDM.app/en.lproj/Localizable.strings
[36minfo[39m: Will try to parse the plist file as XML
[36minfo[39m: [debug] Could not parse plist file (as XML) at /Users/smzdm/Documents/svn/iphone/iPhone5.10/build/Debug-iphoneos/SMZDM.app/en.lproj/Localizable.strings
[33mwarn[39m: Could not parse app Localizable.strings assuming it doesn't exist
[36minfo[39m: [debug] Getting bundle ID from app
[36minfo[39m: [debug] Parsed app Info.plist (as binary)
[36minfo[39m: [debug] Creating instruments
[36minfo[39m: [debug] Preparing uiauto bootstrap
[36minfo[39m: [debug] Dynamic bootstrap dir: /Users/smzdm/Library/Application Support/appium/bootstrap
[36minfo[39m: [debug] Dynamic env: {"nodePath":"/usr/local/Cellar/node/0.12.0/bin/node","commandProxyClientPath":"/usr/local/lib/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js","instrumentsSock":"/tmp/instruments_sock","interKeyDelay":null,"justLoopInfinitely":false,"autoAcceptAlerts":false,"autoDismissAlerts":false,"sendKeyStrategy":"grouped"}
[36minfo[39m: [debug] Dynamic bootstrap code: // This file is automatically generated. Do not manually modify!
...
[36minfo[39m: [debug] Dynamic bootstrap path: /Users/smzdm/Library/Application Support/appium/bootstrap/bootstrap-cde5f4e871296054.js
[36minfo[39m: [debug] Reusing dynamic bootstrap: /Users/smzdm/Library/Application Support/appium/bootstrap/bootstrap-cde5f4e871296054.js
[36minfo[39m: [debug] Attempting iOS device log capture via libimobiledevice idevicesyslog
[36minfo[39m: [debug] Creating iDevice object with udid ff68a9c7db8d72b8ab2f8359a644c34d9d56bc87
然后等待 5 分钟也不会超时中断
@classmethod
def connect_app(cls):
success = True
desired_caps = {}
desired_caps['appium-version'] = '1.4.10'
desired_caps['platformName'] = 'iOS'
desired_caps['deviceName'] = 'iPhone 5'
desired_caps['app'] = 'com.smzdm.client.ios'
desired_caps['platformVersion'] = '7.1'
desired_caps['udid'] = 'ff68a9c7db8d72b8b2f8359a644c34d9d56bc87' # iphone 5
print 'app connecting......'
wd = webdriver.Remote('http://0.0.0.0:4723/wd/hub', desired_caps)
还可以从什么地方获取到有帮助的 log 信息?