ios - instruments + 来自 shell 脚本的 UIAutomation

标签 ios ui-automation ios-ui-automation xcode-instruments

<分区>

Possible Duplicate:
Is there a way to remove the authorization prompt from command-line instances of Instruments (XCode)?

我整天都在构建一个 jenkins 作业来自动运行我的 UIAutomation 脚本。我一个一个地解决了执行此操作的所有问题(jenkins 默认情况下作为守护进程运行,还有很多),我还剩下一个。 'instruments' 命令将请求允许收听进程或其他内容(我忘记了确切的措辞),因为这需要用户提示/通过它会杀死我的脚本并出现错误:

Failed to authorize rights (0x2) with status: -60007

这是我实现此功能的最后一个障碍,我已经尝试过:

echo "user\npassword" | instruments ....

但这似乎根本没有提供这些提示值。仍然失败并出现相同的错误。如何在某处运行仪器或修改某些文件,使其不再提示?

谢谢!

最佳答案

听起来我很快就要自己深入研究了。

我很好奇如果您将 instruments 命令添加到/etc/sudoers 然后尝试运行会发生什么。可能会避免您看到的身份验证提示。

试一试:

  1. 在终端中“sudo visudo”

  2. 添加这一行(将“yourargs”替换为其余的仪器命令)

你的用户名 ALL=NOPASSWD:/usr/bin/instruments yourargs

然后尝试运行 Jenkins 代理尝试运行的命令,在其前面加上“sudo”前缀,例如“sudo 仪器……”

关于ios - instruments + 来自 shell 脚本的 UIAutomation,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10241849/

上一篇:iphone - Apple OTA 应用分发 : App Download Issue

下一篇:ios - 以 Label 作为 subview 的 CATransform3D 旋转

相关文章:

ios - 我的 tableview 单元格上的组件不可见

winforms - 为什么 Inspect.exe 在调试中运行时不显示 AutomationId 和其他 UIAutomation 属性?

java - 无法加载 Skuli 库

iphone - 使用 UIAutomation 单击键盘 'Next' 键

iphone - UI 自动化 :- How to click button using javascript of a screen which is not the main screen (iPhone)?

ios - 滚动水平 Collection View 时的随机行为

ios - 如何在 Xcode 中指定表单完成后加载的 View ?

ios - 必须为标识符注册一个 nib 或一个类,或者在 Storyboard中连接一个原型(prototype)单元

c# - pattern.Invoke() 异常 : Operation is not valid due to the current state of the object

javascript - 如何在iOS自动化脚本中搜索字符串中的子字符串? indexOf() 和 search() 方法不起作用