Silent installation for Safari extension on Mac without any user prompt

I am setting up Selenium testing for Safari 5 on Mac. I need to install our Safari extension before, and this should happen silently and without any user prompts. From previous posts, I found that this works in that it loads a browser with the extension:

open -a safari okta.safariextz

But it leaves the browser open with a prompt to the user: "Do you really want to install the extension?"

Selenium does not have access to this hint and cannot click install. I need to configure Safari so that it does not prompt for user installation, but simply allows you to install the extension.

Is there any way to do this?

Any pointers appreciated.

-Denali

+5
source share
2 answers

Edit: a possible new method: . The answer here may seem (somewhat obscure) that it is possible to risk ruining your future safari updates, you can manually install the extension, skip the confirmation prompt, move the file and hack the plist. I haven't tried it, but it looks like this might work:

If you just do this for internal deployment and don’t mind if it breaks when upgrading Safari, you can exit Safari, install the extension in ~ / Library / Safari / Extensions and update ~ / Library / Safari / Extensions / Extensions.plist (format pretty obvious / usr / libexec / PlistBuddy is useful for such things).

, - , - plist, . Safari .

( , Selenium, ..), , -, , , , Selenium ( ). , : applescript, "duplo legos": http://www.mactech.com/articles/mactech/Vol.21/21.06/UserInterfaceScripting/index.html ( , , , "", ): http://automator.us/leopard/features/virtual-user.html : http://cjrtools.org/mac/tutorials/autohowto.html

+2

, - , . AppleScript Selenium.

StackOverflow AppleScript Safari, :

Safari ?

0

All Articles