Safari Plugin Support in BrowserStack Automate
Learn how to install Safari plugins in BrowserStack Automate Selenium sessions on macOS.
This document provides a solution for enabling Safari plugin support in BrowserStack Automate Selenium sessions on macOS. Unlike Chrome or Firefox, which allow plugin installation via chromeOptions or firefoxOptions, Safari extensions require a different approach. Read on to learn how to configure Safari plugins for Selenium sessions on macOS.
Supported Environment
The following table highlights the supported environment values to successfully emulate Safari plugins on BrowserStack Automate:
Issue | Supported values |
---|---|
Framework | Selenium |
File Type |
.zip (must contain an .app file in the extracted content) |
OS | macOS |
macOS Versions | Big Sur, Monterey, Ventura, Sonoma, Sequoia |
Extension Type | Signed Web Extensions |
BrowserStack Automate supports the upload of Safari extensions through the existing upload media functionality. The following steps outline the process:
Step 1: Prepare the Extension File
Create a .zip
file that contains the Safari extension in the .app
directory format.
Step 2: Upload the Extension
To upload the Safari extension, use the following cURL command:
The maximum allowed file size is 15 MB.
Step 3: Handle response
After you successfully upload, the API returns a response with the media_url
, as shown in the example.
"media_url":"media://f7c874f21852ba57957a3fdc33f47514288c4ba4"
Update this media_url
obtained in Step 2 in your script, as shown below
If the upload fails, an error message specifies the issue with the uploaded file.
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
Thank you for your valuable feedback!