主要的问题提前说
不知道为什么,新版Appium 1.5.2的GUI端出现了个问题,
appium-doctor不知道为什么丢失了~官网重新下载了个历史版本
就没有问题了~
重装电脑,连jdk都需要自己重新安装
安装brew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- 安装时遇到坑
MacBook-Pro:~ admin$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
You have not agreed to the Xcode license.
Before running the installer again please agree to the license by opening
Xcode.app or running:
sudo xcodebuild -license
MacBook-Pro:~ admin$ sudo xcodebulid -license
WARNING: Improper use of the sudo command could lead to data loss
or the deletion of important system files. Please double-check your
typing when using sudo. Type "man sudo" for more information.
To proceed, enter your password, or type Ctrl-C to abort.
Password:
sudo: xcodebulid: command not found
刚开始没明白什么意思,其实是要求同意一下xcode的许可,然后就可以了
安装node
brew install node
安装appium(命令行和GUI版本都进行了安装)
sudo npm install -g appium --verbose
显示npm的安装细节log
appium-selendroid-driver@1.3.3 install /usr/local/lib/node_modules/appium/node_modules/appium-selendroid-driver
> node ./bin/install.js
dbug AndroidDriver Getting Java version
info SelendroidInstaller Ensuring /usr/local/lib/node_modules/appium/node_modules/appium-selendroid-driver/node_modules/appium-selendroid-installer/selendroid/download exists
info SelendroidInstaller Downloading Selendroid standalone server version 0.17.0 from https://github.com/selendroid/selendroid/releases/download/0.17.0/selendroid-standalone-0.17.0-with-dependencies.jar --> /usr/local/lib/node_modules/appium/node_modules/appium-selendroid-driver/node_modules/appium-selendroid-installer/selendroid/download/selendroid-server.jar
info AndroidDriver Java version is: 1.8.0_40
info SelendroidInstaller Writing binary content to /usr/local/lib/node_modules/appium/node_modules/appium-selendroid-driver/node_modules/appium-selendroid-installer/selendroid/download/selendroid-server.jar
info SelendroidInstaller Selendroid standalone server downloaded
info SelendroidInstaller Determining AndroidManifest location
info SelendroidInstaller Determining server apk location
info SelendroidInstaller Extracting manifest and apk to /usr/local/lib/node_modules/appium/node_modules/appium-selendroid-driver/node_modules/appium-selendroid-installer/selendroid/download
info SelendroidInstaller Copying manifest and apk to /usr/local/lib/node_modules/appium/node_modules/appium-selendroid-driver/node_modules/appium-selendroid-installer/selendroid
info SelendroidInstaller Cleaning up temp files
info SelendroidInstaller Fixing AndroidManifest icon bug
npm verb lifecycle appium-selendroid-driver@1.3.3~install: unsafe-perm in lifecycle false
npm verb lifecycle appium-selendroid-driver@1.3.3~install: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/usr/local/lib/node_modules/appium/node_modules/appium-selendroid-driver/node_modules/.bin:/usr/local/lib/node_modules/appium/node_modules/.bin:/usr/local/lib/node_modules/.bin:/usr/local/bin:/Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/admin/work/dev/android-sdk-macosx/platform-tools:/Users/admin/work/dev/android-sdk-macosx/tools:/Users/admin/Downloads/gradle-2.8/bin:/Users/admin/work/dev/android-sdk-macosx/tools:/Users/admin/work/dev/android-sdk-macosx/platform-tools
npm verb lifecycle appium-selendroid-driver@1.3.3~install: CWD: /usr/local/lib/node_modules/appium/node_modules/appium-selendroid-driver
配置Android开发环境
下载JDK, Android Studio,并下载最新的SDK
安装ruby
\curl -sSL https://get.rvm.io | bash -s stabler
vm install ruby
配置环境变量
vi ~/.bash_profile
编辑配置文件
在文件中补充以下内容
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home
export ANDROID_HOME=/Users/admin/Library/Android/sdk
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
source ~/.bash_profile
配置文件重载
好久不用vi,都快忘了:
- i 进入编辑模式
- 按esc键,退出编辑模式
- :w 保存
- :q 退出
顺便,Mac下在显示隐藏文件,在Terminal中复制或输入以下命令(区分大小写):
defaults write com.apple.Finder AppleShowAllFiles YES
别忘了重启Finder
运行下GUI的Appium应用,点击听诊器
如果有问题,根据提示来操作就可以了.如果正确,如下图基本就是可用了.
在中断中输入appium
能启动基本也就正常了.
运行个示例看看,
点击放大镜
包出现了问题了,因为包放在了ftp服务器上了,需要放在本地,写上绝对路径或者appium的相对路径
运行成功之后显示界面
需要安装相关语言的支持包,考虑python和java.如果脑子够用,考虑看看ruby.
Appium Desktop
Appium GUI工具更新了.
安装后界面如下:
默认本地路径,4723端口.
支持服务的特殊配置还有记录.
启动之后界面如下
右上角熟悉的按钮
放大镜依然启动Inspector