【发布时间】:2018-03-28 08:48:28
【问题描述】:
我正在尝试在苹果脚本中运行 curl 命令,我正在执行以下操作:
set trial_1 to "/somepath"
set output to do shell script ("export TRIAL_1=" & trial_1)
set output to do shell script ("curl -H 'Content-Type: application/json' -X POST -d '{\"desiredCapabilities\":{"xcodeConfigFile\":quoted form of output}}'http://localhost:4723/wd/hub/session")
这是以“引用形式的输出”作为参数并运行。我要做的是使用输出的变量值运行。
当我在终端上尝试 curl 命令时
curl -H 'Content-Type: application/json' -X POST -d '{\"desiredCapabilities\":{"xcodeConfigFile\":"'"$TRIAL_1"'"}}'http://localhost:4723/wd/hub/session,
它就像一个魅力。我如何在applescript中传递相同的内容?
【问题讨论】:
标签: curl applescript