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 安装 ...
随机推荐
- 使php支持pdo_mysql
1.下载pdo_mysql包 wget https://pecl.php.net/get/PDO_MYSQL-1.0.2.tgz 2.追加编译php,使其module目录下生产pdo_mysql.so ...
- [P3676]小清新数据结构题
Description: 给你一棵树,每次询问以一个点为根时所有子树点权和的平方和 带修改 Hint: \(n\le 2*10^5\) Solution: 这题只要推出式子就很简单了 如果不换根这个平 ...
- java判断通常的逻辑
package com.stylefeng.guns.core.common.constant.factory; import com.baomidou.mybatisplus.mapper.Enti ...
- GMA Round 1 离心率
传送门 离心率 P是椭圆$\frac{x^2}{a^2}+\frac{y^2}{b^2}=1$上一点,F1.F2为椭圆左右焦点.△PF1F2内心为M,直线PM与x轴相交于点N,NF1:NF2=4:3. ...
- Centos 7 上使用nginx为Node.js配置反向代理时错误:(13: Permission denied) while connecting to upstream
错误来源:Centos 7 上使用nginx为Node.js配置反向代理时产生(13: Permission denied) while connecting to upstream的错误 nginx ...
- static和extern的用法小结
以前写程序是,基本不管static和extern,一个工程文件也只有一个c文件.今天尝试用多个文件来写,自然就涉及到这两个关键词的使用,自己查了些资料,并且做了些实验,总结如下. extern的用法 ...
- F#周报2019年第15期
新闻 Hedgehog新站点 Bolero 0.4发布,增加远程认证 FsToolkit.ErrorHandling与Cvdm.ErrorHandling合并了 F#里的3D图形编程与游戏开发 有趣的 ...
- Mysqlutil.JDBCutil.Dtabaseutil数据库操作工具类[批量操作]
一个用来操作数据库的常用工具类. 提供批量操作,生成建表,插入语句等 操作示例: // 1.获取连接 DataBaseUtil jdbc = new DataBaseUtil(); jdbc.getC ...
- 6. Scala面向对象编程(基础部分)
6.1 基本介绍 6.1.1 Scala语言是面向对象的 1) Java时面向对象的编程语言,由于历史原因,Java中海存在着非面向对象的内容:基本类型,null,静态方法等 2) Scala语言来自 ...
- 《ABCD组》第一次作业:团队亮相
ABCD组:团队亮相 项目 内容 这个作业属于哪个课程 http://www.cnblogs.com/nwnu-daizh/ 这个作业的要求在哪里 https://www.cnblogs.com/nw ...