iOS 测试 Windows 实现 appium+iOS 自动化测试

机智的小白 · 2021年10月10日 · 最后由 机智的小白 回复于 2021年11月28日 · 3324 次阅读

在前面的文章介绍了 Windows 上安装配置 tidevice,环境搭建好后就实现了在 Windows 运行 iOS 自动化的第一步,接下来本文重点介绍在 Windows 上如何运行 iOS 自动化测试。

如果没有安装好 tidevice 的可以参考文章https://testerhome.com/topics/31207
一、启动 XCTest

1、在终端输入命令:tidevice xctest -B com.facebook.WebDriverAgentRunner.xctrunner

2、修改监听端口为 8200, 并显示调试日志:tidevice xctest -B com.facebook.WebDriverAgentRunner.xctrunner -e USB_PORT:8200 —debug

3、转发请求到手机并把传输的内容用 hexdump 的方法 print 出来:tidevice relay -x 8100 8100

二、运行 WebDriverAgent

1、在终端输入命令:
tidevice wdaproxy -B com.xxx.xxx.WebDriverAgentRunner.xctrunner --port 8200

2、appium 需要配置以下参数:

"usePrebuiltWDA": "false",

"useXctestrunFile": "false",

"skipLogCapture": "true"

具体 appium 脚本配置如下:

3、运行成功后如图所示:

共收到 6 条回复 时间 点赞

试了下,可行😀

僅樓主可見

你好,我在打包完之后,用 python 代码操作 appium 的时候,报了下面的错,这个是安装 webDriverAgent 处理错误吗,但是我用 weditor 他是可以用的

hello_python 回复

像是 WebDriverAgent 没有运行起来

ios 设备可以无线链接吗?

6楼 已删除
kitty 回复

还是需要使用到数据线的

需要 登录 後方可回應,如果你還沒有帳號按這裡 注册