Enabling Apple Safari for Web UI tests on macOS

You can record and play back Web UI tests in the Apple Safari browser to test the web applications. To record Web UI tests in the Safari browser, you must first enable the browser and then record tests.

About this task

The Safari browser is ready to record Web UI tests after you enable the remote automation feature and install the Web UI extension. The Safari browser is ready to play back Web UI tests immediately after you enable the remote automation feature.
Note: The installation of the Web UI extension is required only for recording and not for playing back of Web UI tests.

Procedure

  1. Enable the remote automation feature by performing the following steps:
    1. Click Safari > Preferences > Advanced tab, and then select the Show Develop menu in the menu bar checkbox.

      The Develop menu is displayed in the menu bar.

    2. Click the Develop menu, and then select Allow Remote Automation.

      The remote automation feature is enabled.

  2. Install the Web UI extension for the Safari browser by performing the following steps:
    1. Navigate to the SafariWebExtension.zip file within the shared installation directory. For example,<IMShared>/plugins/com.ibm.rational.test.rtw.webgui.browextension.safari_<version string>/SafariWebExtension/SafariWebExtension.zip.
    2. Double click the compressed file.

      The file is automatically extracted and saved in your system.

    3. Double-click the extracted file.

      The Web UI extension is automatically installed.

      Note: If an error message is displayed, perform the following steps:
      1. Click System Preferences > Security & Privacy > General.

        You can view an error message in the Allow apps downloaded from: section.

      2. Click the Allow button.

        The Web UI extension is unblocked, and you can successfully open the extension.

  3. Verify whether the extension is installed, and the required browsers are enabled by performing the following steps:
    1. Open the Safari browser.
    2. Click Safari > Preferences > Extensions.

      The installed extension is displayed on the Extensions page.

    3. Select the DevOps Test UI - Web UI extension.

      The details related to permissions for the selected Web UI extension are displayed on the right pane of the Extensions page.

    4. Perform one of the following steps:
      • Click the Edit Websites… button.

        You can allow the Web UI extension to read and alter specific websites that you visit by entering the list of corresponding URLs.

      • Click the Always Allow on Every Website… button.

        You can allow the Web UI extension to read and alter all websites.

Results

The Safari browser is enabled for recording and playing back Web UI tests.

What to do next

You can now record or play back a Web UI test in the Safari browser.