解决 XCUItest Enable UI Automation 每次启动需要输入锁屏密码

解决XCUItest Enable UI Automation每次启动需要输入锁屏密码

自从服务器更新版本后,每次执行 iOS UI自动化测试都需要锁屏密码

  • macOS Monterey Version 12.0.1
  • Xcode Version 13.1 (13A1030d)
    [外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-88jQHgff-1646278780476)(/uploads/photo/2022/e0a7adff-79a4-4bbb-82af-3037443f9425.png!large)]

解决办法

若不解决该问题,将没有办法做到持续测试。于是不断翻阅官方文档,找到解决方案

xcodebuild -target MemoryLeaksUITests -scheme MemoryLeaks test
The automationmodetool command line tool allows you to manage UI automation security preferences, see its man page for details. To resolve your issue, run the following command as a administrator on your machine: 
       automationmodetool enable-automationmode-without-authentication

To disable this mode, run the following command as a administrator on your machine: 
     automationmodetool disable-automationmode-without-authentication

Note that the man page shows leading dash in front of each of the above two commands, it is a bug. Please disregard it and use the commands as described above. 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值