全网最详细的appium 自动化测试iOS(二)
·
一、环境准备:
1、安装appium
2、xcode
(appium 版本:12.1.0 + xcode版本:12.5 可正常运行,ps:appium 版本:12.1.0 + xcode版本:13.0 一直报奇奇怪怪的错误)
3、依赖工具包安装
brew install --HEAD ideviceinstaller
brew install --HEAD libimobiledevice
brew install ios-deploy
4、测试app,使用官方推荐的demo来进行测试
地址:https://github.com/appium/ios-uicatalog

克隆到本地:
git clone https://github.com/appium/ios-uicatalog.git
二、
1、打开xcode、打开项目

2、编译运行:



成功运行 ios模拟器

3、使用appium 运行模拟器 打开测试app

start session

三、执行脚本启动:
import time
import pytest
from appium import webdriver
classTestdemo:defsetup_class(self):
desired_caps ={"platformVersion":"14.5","platformName":"iOS","deviceName":"iPhone 12","app":"/xxxx/xxxx/DerivedData/UIKitCatalog-eppvxufmuhyeyhfxhygkhqccbfjh/Build/Products/Debug-iphonesimulator/UIKitCatalog.app"}
self.driver = webdriver.Remote('http://127.0.0.1:4723/wd/hub', desired_caps)
如果对你有帮助的话,点个赞收个藏,给作者一个鼓励。也方便你下次能够快速查找。
最后: 下方这份完整的软件测试视频教程已经整理上传完成,需要的朋友们可以自行领取【保证100%免费】

软件测试面试文档
我们学习必然是为了找到高薪的工作,下面这些面试题是来自阿里、腾讯、字节等一线互联网大厂最新的面试资料,并且有字节大佬给出了权威的解答,刷完这一套面试资料相信大家都能找到满意的工作。



更多推荐


所有评论(0)