Enabling the Apple Safari browser to perform 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.
Notes:
- The installation of Web UI extension is required only for recording and not for playing back of Web UI tests.
- You can record tests on the web applications in Safari 12 only.
Procedure
-
Enable the remote automation feature by performing the following tasks:
- Click Show Develop Menu checkbox. tab, and then select the
- Click the Develop menu, and then select Allow Remote Automation.
- Authorize the safaridriver to launch the webdriverd service, which hosts the local web server, by running the following command manually /usr/bin/safaridriver.
- Complete the authentication process.
-
Install the Web UI extension for the Safari browser by performing the following tasks:
- Click Extension Builder in the Develop
menu.
The Extension Builder dialog box is displayed.
- Click the plus icon, and then click Add Extension.
- Navigate to the WebUISafari12.safariextension folder within the shared installation directory. For example, <IMShared>/plugins/com.ibm.rational.test.rtw.webgui.browextension.safari_<version string>/WebUISafari12.safariextension.
- Click Select, and then click Run after the extension is added.
Note: The extension that is added in the Safari browser expires immediately after you quit the Safari browser. You must add the extension again to enable the Safari browser to record the tests. - Click Extension Builder in the Develop
menu.
-
Verify whether the extensions are installed and the browser is enabled by performing
the following steps: