安裝Appium和第一個Demo

Appium

官网:http://appium.io/index.html?lang=zh

安装时有添加系统变量的尽量勾上.记得安装“.net framework 4.0”或更新的版本

官网安装步骤
> brew install node      # get node.js
> npm install -g appium  # get appium
> npm install wd         # get appium client  #Python中可以在Pycharm或使用PIP安装
> appium &               # start appium
> node your-appium-test.js

安装说明:

1、你可以使用我们定制的 cnpm (gzip 压缩支持) 命令行工具代替默认的 npm:

2、安装完淘宝定制的cnpm之后,终端输入:

$ npm install -g cnpm --registry=https://registry.npm.taobao.org
$ cnpm install -g appium

path变量截图

安裝Appium和第一個Demo

验证appiunm安装:

  • 使用npm安装appium后需要安装appium-doctor来验证
npm install -g appium-doctor

安裝Appium和第一個Demo

运行第一个Demo

下载地址:https://github.com/appium/sample-code/tree/master/sample-code/examples

准备工作:

1、模拟器已启动.执行adb devices命令查看是否连接

安裝Appium和第一個Demo

2、启动Appium(GUI或命令行启动都可以)

3、运行Python代码示例,第一次可以启动appium GUI版本.运行的时候看日志.出现问题方便Google

安裝Appium和第一個Demo

安裝Appium和第一個Demo