Appium+iOS真机环境搭建

Appium+iOS真机环境搭建,第1张

概述参考有图详细地址:https://www.jianshu.com/p/703476fb9467 本次环境配置相关: macOS:10.13.4 Appium-desktop 用最新的 Xcode 用最新的 环境 1、 安装homebrew:$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/inst

参考有图详细地址:https://www.jianshu.com/p/703476fb9467

本次环境配置相关:
macOS:10.13.4
Appium-desktop 用最新的
Xcode 用最新的

环境

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进入官网,下载,安装即可。

10、使用appium-doctor 检查Appium iOS环境环境appium-doctor --ios

 

安装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有Ruby,Python,Java三个版本,可自行选择自己喜欢的安装即可 pip install Appium-Python-ClIEnt

总结

以上是内存溢出为你收集整理的Appium+iOS真机环境搭建全部内容,希望文章能够帮你解决Appium+iOS真机环境搭建所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/web/1005065.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-22
下一篇2022-05-22

发表评论

登录后才能评论

评论列表(0条)

    保存