是否可以从Xcode bot运行脚本中打开应用程序

时间:2014-05-16 20:51:02

标签: ios xcode continuous-integration applescript appium

我正在构建一个具有一些预操作运行脚本的iOS应用程序。更具体地说,我的运行脚本旨在打开终端并运行命令来打开Appium(自动化应用程序)。我使用以下AppleScript

在我的本地机器上工作
set scriptPath to " test.sh" //test.sh is a script that opens appium and runs some tests
tell app "Terminal"
do script scriptPath
end tell

当我在本地计算机上构建并运行我的应用程序时,脚本运行正常 - 它会打开终端,然后打开appium,然后启动我的自动化测试。问题是,当我尝试使用Xcode CI进行构建(并运行我的自动化)时,终端永远不会打开。我查看了console.app,我得到的错误如下:

osascript: spawn_via_launchd() failed, errno=5 label=com.apple.Terminal.9008

经过大量的研究和挖掘后,我开始怀疑这是否与苹果公司对运行UI应用程序的守护进程的(相对)新限制有关(问题在这个帖子中提出:NSWorkspace launchApplication: fails for the first time with root user

那么,这是我的问题吗?是否无法从Xcode机器人打开应用程序?如果没有人找到办法做到这一点?

谢谢!

0 个答案:

没有答案
相关问题