appium 1.6.3+Xcode运 For Mac

1. 下载两个版本的Xcode, Xcode 1.7.3 与Xcode 8.2 ,放置在不同的目录下。进入terminal, 选择需要的版本:

sudo xcode-select -switch  //或者-s
/Users/beyondsoft/Downloads/Xcode.app/Contents/Developer   //需要用到的Xcode 地址
sudo xcode-select -p   //查看是否选择成功

2. 启动Xcode 8.2,启动模拟器,选择设备与版本,将编译过后的.app软件安装到模拟器设备(用真机更稳定)

xcrun simctl install booted xxx.app   //xxx.app为app的路径,直接拖入terminal

 报错:

No devices are booted. 

找了很多资料,

a.

Copy-paste Xcode-beta.app from Applications folder to somewhere else, e.g. Documents folder.

Delete Xcode-beta.app from Applications folder.

Move Xcode-beta.app from Documents to Applications folder again.

b.

sudo xcode-select -switch Xcode路径/Contents/Developer

3. 为了方便,用真机运行,打开Xcode8, 点击已经链接的设备,添加ipa。terminal 启动appium, 启动eclipse 测试代码。

报错:

 

Encountered internal error running command: Error: Could not initialize ios-deploy make sure it is installed and works on your system

 

解决:

brew install -g ios-deploy

重新运行,继续报错WebDriverAgent:

An unknown server-side error occurred while processing the command. Original error: Unable to start WebDriverAgent

好吧,貌似是WebDriverAgent没有安装好

 

 

 

 

 

posted @ 2016-12-19 16:51  lynnhq  阅读(898)  评论(0)    收藏  举报