Appium+Python3+iOS真机环境搭建
Appium 是一个自动化测试开源工具,支持 iOS 平台和 Android 平台上的原生应用,web 应用和混合应用。
本次环境配置相关:
macOS:10.13.4
Appium-desktop:1.6.1
Xcode:9.3.1
一、环境配置
1、 安装homebrew:
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
2、 安装libimobiledevice:
$ brew install libimobiledevice --HEAD
3、 安装carthage:
$ brew install carthage
4、安装node:
$ brew install node
5、安装npm:
$ brew install npm
6、安装ios-deploy:
$ npm install -g ios-deploy
8、安装xcpretty:
$ gem install xcpretty
9、安装appium,appium-doctor
进入官网,下载Appium-1.6.1.dmg,安装即可。
当然你可以使用命令:npm install -g appium来安装appium,但是后面就会各种报错!!
$ npm install -g appium-doctor
10、使用appium-doctor 检查Appium iOS环境环境
appium-doctor --ios
info AppiumDoctor Appium Doctor v.1.4.3
info AppiumDoctor ### Diagnostic starting ###
info AppiumDoctor ✔ The Node.js binary was found at: /usr/local/bin/node
info AppiumDoctor ✔ Node version is 10.1.0
info AppiumDoctor ✔ Xcode is installed at: /Applications/Xcode.app/Contents/Developer
info AppiumDoctor ✔ Xcode Command Line Tools are installed.
info AppiumDoctor ✔ DevToolsSecurity is enabled.
info AppiumDoctor ✔ The Authorization DB is set up properly.
info AppiumDoctor ✔ Carthage was found at: /usr/local/bin/carthage
info AppiumDoctor ✔ HOME is set to: /Users/wangjuan
info AppiumDoctor ### Diagnostic completed, no fix needed. ###
info AppiumDoctor
info AppiumDoctor Everything looks good, bye!
info AppiumDoctor
二、安装WebDriverAgent
1、进入appium安装目录下WebDriverAgent文件夹,具体路径参照自己的路径,可以通过find命令查找
cd /Applications/Appium.app/Contents/Resources/app
/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent
2、在WebDriverAgent目录下执行以下命令
mkdir -p Resources/WebDriverAgent.bundle
sh ./Scripts/bootstrap.sh
3、编译WebDriverAgent.xcodeproj
Xcode打开当前目录下的WebDriverAgent.xcodeproj文件

注意:进入项目后要编辑一些内容,请无比按照步骤全部修改。
1、TARGETS->WebDriverAgentLib的Bundle Identifier更改为自己命名的Identifier。(所有Identifier注意保持一致!!)
2、TARGETS->WebDriverAgentLib的Signing选择使用个人的证书。

3、TARGETS->WebDriverAgentRunner的Signing选择使用个人的证书。

4、PROJECT->WebDriverAgent的Product Bundle Identifier更改为自己命名的Identifier。(所有Identifier注意保持一致!!)

5、TARGETS->WebDriverAgentLib的Product Bundle Identifier更改为自己命名的Identifier。(所有Identifier注意保持一致!!)

6、TARGETS->WebDriverAgentRunner的Product Bundle Identifier更改为自己命名的Identifier。(所有Identifier注意保持一致!!)

7、Device选择已连接的测试机
8、点击build按钮来测试,按照步骤设置后,可build succeeded~

9、测试机上安装证书,执行以下命令:
xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination 'id=测试机的udid' test
如果没有报错证明安装成功,同时手机上会安装一个WebDriverAgent软件。需要在手机设置->通用->设备管理->信任开发者。如下图:


三、Appium Client端
Appium Client有Ruby,Python,Java三个版本,可自行选择自己喜欢的安装即可,本次只针对Python版安装:
pip install Appium-Python-Client
Appium+Python3+iOS真机环境搭建的更多相关文章
- Appium+iOS真机环境搭建
安装目录 1.macOS系统 10.12.6 2.xcode 9.0 3.appium Desktop 1.12.1 4.node.js node -v npm 5.cnpm npm insta ...
- Windows系统appium移动端自动化真机环境搭建
appium-windows-android环境搭建完成以后,就可以进行真机模式下的appium环境搭建啦!! 准备:把要测试的app下载至本机(小波的是把apk放在桌面上,例如:C:\Users\w ...
- mac 下 配置appium +ios真机环境
mac系统:10.11.6 xcode:7 appium:1.5.3 iphone: 6 p 1.搭建 appium 安卓的环境: 1.jdk 2.sdk 3.appium 4.配置环境变量 mac下 ...
- Appium安卓真机环境搭建
说明 步骤可能比较简洁,因为手头上有安卓测试机,所以需要配置虚拟机的童鞋请去虫师博客园,因为我也是从那儿学的,哈哈.点我飞到虫师那儿 但是如果你要搭建真机测试环境的话,本教程将是最简单实用的. 1. ...
- Appium robotframework-appium (ios 客户端测试)环境搭建
一. 简介 1.1摘要 本人测试新人,最近在搞ios客户端的自动化,准备采用robotframework-appium来实现自动化测试,一边学习一边总结,此安装说明文档是基于mac系统10.11版本, ...
- 如何在 iOS 真机运行 Appium
使用 gui 启动的 appium 1.2.2 也会有这个问题,所以你要把 deviceconsole 复制到 /Applications/Appium.app/Contents/Resources/ ...
- appium ios真机自动化环境搭建&运行(送源码)
appium ios真机自动化环境搭建&运行(送源码) 原创: f i n 测试开发社区 6天前 Appium测试环境的搭建相对比较烦琐,不少初学者在此走过不少弯路 首先是熟悉Mac的使用 ...
- appium ios真机自动化环境搭建&运行(送源码)
appium ios真机自动化环境搭建&运行(送源码) 原创: f i n 测试开发社区 6天前 Appium测试环境的搭建相对比较烦琐,不少初学者在此走过不少弯路 首先是熟悉Mac的使用 ...
- 搭建Mac+Java+appium+IOS真机自动化环境
一.安装前环境准备 1.确保电脑已经有homebrew(包管理器) 下载链接[https://brew.sh/] 2.通过 brew 安装node.js brew install node 安装 ...
随机推荐
- XVIII Open Cup named after E.V. Pankratiev. Eastern Grand Prix
A. Artifacts 建立语法分析树,首先根据上下界判断是否有解,然后将所有数按下界填充,线段树判断是否存在和超过$K$的子区间. B. Brackets and Dots 最优解中一定包含一对中 ...
- [BZOJ1984][Luogu4315]月下“毛景树”
题目大意 给出一棵 n 个点的无根树,待边权,要求维护一下操作: 修改某条边的边权 修改点 u 到点 v 路径上所有边的边权 点 u 到点 v 路径上所有边的边权加上某个值 查询点 u 到点 v 路径 ...
- svn没有权限报出的错
- 全是Bug
一.开始实现程序之前 1. 在文章开头给出结对使用的Github项目地址和结对伙伴的作业地址.(两个人使用同一个) 我的结对伙伴是 : 201731044205. 伙伴的作业地址: https://w ...
- ELK 5.5.0 安装
Preparation 假设当前为root用户,并已有jdk1.8环境. cd /opt/package useradd sealion ElasticSearch wget https://arti ...
- 超小Web手势库AlloyFinger原理(转载)
目前AlloyFinger作为腾讯手机QQ web手势解决方案,在各大项目中都发挥着作用. 感兴趣的同学可以去Github看看: https://github.com/AlloyTeam/AlloyF ...
- 107个JS常用方法(持续更新中)
1.输出语句:document.write(""); 2.JS中的注释为//3.传统的HTML文档顺序是:document->html->(head,body)4.一个 ...
- [SDOI2009]SuperGCD
题目链接 这题.高精度.恶心.难受. 那么高精度的gcd怎么做呢? 若a=b gcd(a,b)=a ①a偶b偶 gcd(a,b)=2*gcd(a/2,b/2) ②a偶b奇 gcd(a,b)=gcd(a ...
- dynamic 类型不能访问属性
x //解决方案ProjectTest.项目A里面public object r(){ ,name = "zf"}; } //解决方案ProjectTest.项目B里面 publi ...
- Python读取xlsx翻译文案
首先安装Python,然后安装模块 //查找模块(非必须) pip search xlrd //安装模块 pip install xlrd 由于输出要是utf-8所以需要设置默认环境为utf-8 # ...