# Extension for Safari

> Install and configure the UiPath Extension for Safari to enable UI automation in Safari on macOS with Studio Web and local macOS Robot.

Starting with UiPath.UIAutomation.Activities version 24.10.0, Safari UI Automation support is available in preview. The extension for Safari lets you:

* Design UI automations in Studio Web within the Safari browser on macOS.
* Execute browser automations in Safari using a local macOS Robot, previously installed and connected to the Orchestrator.
* Start attended browser automations in Safari via the macOS Assistant.

To create and run such automations, you must install the UiPath Browser Automation extension for Safari.

You can start from Studio Web by adding any UI Automation activities. When accessing Studio Web from Safari, you are prompted to install the UiPath extension for Safari from the App Store. Follow the setup guide to configure the extension, then start designing your workflows for browser automation in Safari.

:::note
To create browser automations in Safari on machines running macOS, the minimum supported version is macOS 12.
:::

## Install

### Install from UiPath Studio Web

1. In UiPath Automation Cloud™, access Studio Web.
2. Add a **Use Browser** activity to your project. You are prompted to install the UiPath extension for Safari.

   ![Install UiPath extension for Safari prompt in Studio Web](https://dev-assets.cms.uipath.com/assets/images/studio/studio-docs-image-434492-3076efa6.webp)
3. Select the **Install extension** button.
4. The App Store opens with the **UiPath Browser Automation** extension.
5. Select **Get** to install the extension, and then **Open** it.

   ![UiPath Browser Automation extension in the App Store](https://dev-assets.cms.uipath.com/assets/images/studio/studio-docs-image-434488-be79c6d1.webp)
6. After you select **Open**, a configuration window appears.

   ![UiPath Browser Automation extension configuration window](https://dev-assets.cms.uipath.com/assets/images/studio/studio-docs-image-434508-dc636720.webp)
7. Select **Open Safari settings** to access the **Extensions** window, where you can set the right permissions for the newly installed extension.
   1. Enable the **UiPath Browser Automation** extension in the left-side panel.

   ![Safari Extensions settings panel with UiPath Browser Automation listed](https://dev-assets.cms.uipath.com/assets/images/studio/studio-docs-image-434504-8ef87fda.webp)
   2. Select **Always Allow on Every Website** and confirm this choice.

   ![Safari permissions dialog with Always Allow on Every Website option](https://dev-assets.cms.uipath.com/assets/images/studio/studio-docs-image-434496-bf31edd5.webp)
   3. If you intend to use private browsing, enable the **Allow Private Browsing** setting.

#### Result
A message informs you that the extension is now available.

### Install from App Store

You can access the UiPath extension for Safari directly in the [App Store](https://apps.apple.com/ro/app/uipath-browser-automation/id6477574719) and continue the installation process from [step 4](https://docs.uipath.com/studio/standalone/latest/user-guide/extension-for-safari) of the previous section.

### Install from UiPath Assistant

Installing the Safari extension from Studio Web or directly from the App Store also installs the Native Host component. This means that you can run automations from UiPath Assistant without the need for additional installation.

Installation using **UiPath Assistant** requires only a few clicks, with no additional configuration, as long as UiPath Assistant is already installed. This method installs the latest extension version published to the Web Store for the **current user** only.

#### Install Steps

1. Access **UiPath Assistant**.
2. Select the account icon.
3. Select **Preferences**.
4. Go to **UiPath Extensions**.
5. Select **View on App Store** for **Safari**.

   ![UiPath Assistant UiPath Extensions settings showing Safari extension option](https://dev-assets.cms.uipath.com/assets/images/studio/studio-docs-image-489364-fc621ccb.webp)
6. Select **Install**.
7. Select **Open**.
8. Follow the steps required by the extension.

**Result**
The extension is installed and enabled in Safari.

### Install using an MDM

To install via an MDM (mobile device management) application, the machine has to be enrolled to be managed. More details on how device management works on Apple machines can be found on this page: [Device Management | Apple Developer Documentation](https://developer.apple.com/documentation/devicemanagement).

Examples of MDMs include:

- [Jamf](https://www.jamf.com/)
- [Microsoft Intune](https://www.microsoft.com/en-us/security/business/microsoft-intune)
- [Kandji](https://www.kandji.io/)
- [MicroMDM](https://micromdm.io/) (open-source)

This method relies on the new [declarative management model](https://developer.apple.com/documentation/devicemanagement/leveraging-the-declarative-management-data-model-to-scale-devices) to push configuration changes to the managed machine(s). The configuration for Safari extensions is detailed here: [SafariExtensionSettings | Apple Developer Documentation](https://developer.apple.com/documentation/devicemanagement/safariextensionsettings).

### Install from Terminal

The installation from Terminal is performed via `UiPath.ExtensionControl.Portable.dll`.

UiPath provides a tool for managing extension installation: `UiPath.ExtensionControl.Portable.dll`. This tool is distributed with **UiPath Assistant**, which also includes the extension application packaged as an archive.

This method updates the Safari configuration so that the extension is recognized as installed. The extension is installed for the current user only.

:::warning
This method is not meant for production environments, as it relies on a mechanism that Apple might change in future updates. Use it only if no other alternative is available.
:::

#### Prerequisites
- All instances of Safari are closed.

#### Install Steps
1. Open a Terminal and run the following command:

   ```bash
    dotnet /Applications/UiPath\ Assistant.app/Contents/Extensions/UiPath.ExtensionControl.Portable.dll install safari peruser
   ```

2. Start Safari to design and run automations.

## Uninstall

### Uninstall from Safari settings

1. Access **Safari Settings**.
2. Navigate to the **Extensions** tab.
3. Select the **Uninstall** button.

   ![Safari Extensions settings showing Uninstall button for UiPath Browser Automation](https://dev-assets.cms.uipath.com/assets/images/studio/studio-docs-image-491862-eb629ec4.webp)
4. Select the **Show in Finder** button. This opens the Finder with the application selected.

   ![Safari Extensions settings showing Show in Finder button](https://dev-assets.cms.uipath.com/assets/images/studio/studio-docs-image-491874-e4df1876.webp)
5. Open the context menu for the **UiPath for Safari** application and select **Move to the Bin**.

   ![Finder showing UiPath for Safari application with context menu](https://dev-assets.cms.uipath.com/assets/images/studio/studio-docs-image-489518-086c75b0.webp)

   If a pop-up message states the application cannot be deleted because it is in use:

   ![Pop-up warning that UiPath for Safari application cannot be deleted while in use](https://dev-assets.cms.uipath.com/assets/images/studio/studio-docs-image-491870-877eaa1c.webp)

   1. Open **Activity Monitor** and search for **UiPath Native Host for Safari**.

      ![Activity Monitor showing UiPath Native Host for Safari process](https://dev-assets.cms.uipath.com/assets/images/studio/studio-docs-image-491866-57d54a27.webp)

   2. Select the application, choose **Stop**, then select **Quit**.
   3. Return to Finder and select **Move to Bin** again.

      ![Finder showing UiPath for Safari application ready to be moved to Bin](https://dev-assets.cms.uipath.com/assets/images/studio/studio-docs-image-491878-85f7fe5f.webp)

6. Enter your Mac credentials and then select **OK** to authorize this deletion.

   ![macOS credentials dialog to authorize deletion of UiPath for Safari](https://dev-assets.cms.uipath.com/assets/images/studio/studio-docs-image-491883-5eb52c7a.webp)

#### Result
The extension is uninstalled. It is removed from the Safari extension bar and from the Safari Settings Extensions tab.

## Accessibility configuration

To use the **Hardware Events** input mode, you must specifically grant **UiPath Assistant** access to your Mac using the **Privacy & Security** settings.

To do so, follow the steps below:

1. Select the Apple menu.
2. Select **System Settings**.
3. Select **Privacy & Security** in the left sidebar.
4. Go to **Accessibility** by selecting the arrow on the right-hand side.
5. Enable **UiPath Assistant** from the list. If you do not see the application, select **+** at the bottom of the list, search for **UiPath Assistant**, select the application, and choose **Open**. Mac credentials are requested for this change.

   ![macOS Privacy and Security Accessibility settings with UiPath Assistant listed](https://dev-assets.cms.uipath.com/assets/images/studio/studio-docs-image-491887-2846eb57.webp)

### Result
UiPath Assistant is now authorized to use Hardware Events input mode in Safari automations.

## Known limitations

Consider the following limitations when creating browser automations for Safari:

* The extension cannot access file URLs. This is a Safari limitation, as explained in this Apple Developer forum thread ([Allow access to file URLs for web extensions](https://developer.apple.com/forums/thread/654933)).
* The extension does not support multiple profiles.
