如何重新加载命令行Safari浏览器插件? [英] How to reload a Safari Extension from the command line?

查看:548
本文介绍了如何重新加载命令行Safari浏览器插件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要刷新命令行一个Safari浏览器扩展(后来还建立了包)。

I need to "Reload" a Safari extension from the command line (and also build the package later).

如何才能做到这一点?

我想建立一个步骤 - 我的code在CoffeeScript中,因此我反正编译它。

I'd like to build in one step - my code is in CoffeeScript and thus I'm compiling it anyway.

除了绝望谷歌上搜索我尝试使用这个AppleScript的:

Apart from googling hopelessly I tried using this AppleScript:

tell application "System Events"
   tell process "Safari"
       click the button "Reload" of window "Extension Builder"
   end tell
end tell

哪些错误带出来:

Which errors out with:

系统事件得到了一个错误:无法获取按钮窗口的刷新,扩展生成器进程野生动物园的

System Events got an error: Can’t get button "Reload" of window "Extension Builder" of process "Safari".

和这种变化:

tell application "System Events"
    tell process "Safari"
       tell button "Reload" of window "Extension Builder" to perform action
    end tell
end tell

这不给一个错误,但也没有真正做任何事情。

Which doesn't give an error but also doesn't actually do anything.

推荐答案

这可能是按钮是不是命名为如您所愿。请查看 UI的浏览器以查看应用程序的接口层次结构与GUI脚本中使用。

It may be that the button isn't "named" as you expect. Check out UI Browser in order to view an application's interface hierarchy for use with GUI scripting.

在刷新按钮与访问:

click button "Reload"  of UI element "ReloadUninstall[NAME OF EXTENSION HERE]" \
  of UI element 1 of scroll area 1 of window "Extension Builder"

这篇关于如何重新加载命令行Safari浏览器插件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆