背景
当 Xcode 升级到 8,在iOS自动化测试中,以前老的appium(1.5.3)的版本再也无法启动 iOS APP(官错误信息显示:Requested iOS support with version >= 10, using XCUITest driver instead of UIAutomation-based driver, since the latter is unsupported on iOS 10 and up.)。所以我们需要用新的 Appium Desktop 去获取 控件的相关信息(比如id),来让我们的应用可以在iOS 大于 9.3的模拟上跑自动化测试。
环境搭建
- 下载appium desktop(https://github.com/appium/appium-desktop/),在mac上 安装。
- 如下命令安装 carthage。
brew install carthage
- 我目前安装的xcode为9.0.1
- 我目前安装的appium为1.2.4
如何获取控件的相关信息(比如Id)
-
启动appium desktop,并填写host为127.0.0.1,点击Start Server,如下图:
-
点击Sart Inspector Session 按钮,如下图: