Connect to a remote Mac computer
This task describes how to control the UFT One connection to a remote Mac computer, to enable testing Web applications on the Safari browser.
For details on how to work with a connected remote computer and how UFT One handles connection attempts when a previous connection exists, see Work with Apple Safari on a remote Mac computer.
To test Web applications on the Safari browser, install the Micro Focus UFT Agent Safari extension on your Mac computer. For details, see Install and configure the Micro Focus UFT Agent Safari extension on Mac.
UFT One version 2021 R1 and earlier: You also need to install the UFT Connection Agent.
For hardware and software requirements, see the Support Matrix.
Control the connection to the Mac while designing your test
Click the ALM Connection down arrow in the UFT One toolbar and select Remote Connection.
In the dialog that opens, enter the host name or IP Address to use for the Mac.
Optionally, append a port number to the host name. For details, see Configure the port number to use for the UFT One-Mac Connection.
(Optional) Select the Use SSL option in the following situations:
UFT One version 2022 and later
The Micro Focus UFT Agent Safari extension on the Mac is configured to expect an SSL connection.
UFT One version 2021 R1 and earlier The UFT Connection Agent on the Mac is configured to expect an SSL connection.
To use an SSL connection to secure the communication between UFT One and the Mac, make sure that the relevant certificates and key are defined in the Tools > Options >GUI Testing > Remote Connection pane in UFT One and in the preferences of Micro Focus UFT Agent Safari extension on the Mac. For details, see the Secure the communication with the remote Mac computer.
Use the Connect/Disconnect button on this dialog to control the connection status while you edit the test.
This dialog also displays the current status of the connection.
Before you run the test, make sure that you use one of the methods below to set up the UFT One-Mac connection for the run session.
Specify the remote Mac computer to use for running the test/component
Do one of the following:
Select Record > Record and Run Settings to open the Record and Run Settings dialog box.
In the Web tab, select Open the following browser when a record or run session begins.
Select Apple Safari (on remote Mac computer) from the list of browsers.
Set the host (and port) information.
Select whether to initiate an SSL connection.
Select whether to disconnect from the Mac at the end of the run session, and whether to close the browser.
Set the environment variables REMOTE_HOST, BROWSER_ENV, URL_ENV, and USE_SSL (the last two being optional).
In these environment variables, you specify the Mac connection details, the SAFARI browser, and, optionally, the URL to open in the browser.
If you need an SSL-secured connection, set the USE_SSL variable to TRUE. For details, see Desktop web testing parameter values.
UFT One sets up the connection with the specified Mac and runs the Safari browser at the beginning of the run session, whether the test runs it from UFT One’s UI, or from an ALM test set.
Add steps for remote connection
Use the RemoteConnection utility object and its methods: Connect (hostname, [useSSL]), Disconnect, IsConnected to set up and disconnect the connection with the Mac.
Use RemoteConnection.Run (Safari, <URL>), to run the Safari browser on the remote Mac after you establish the connection.
For details, see the Utility Objects section of the UFT One Object Model Reference for GUI Testing.
Configure the port number to use for the UFT One-Mac Connection
By default, UFT One connects to the Mac using port 8822. However, in some situations, you might want to use a different port. For example:
If another application on the Mac uses this port.
If multiple UFT One users need to connect to the same Mac computer. Each UFT One user can use a connection agent installed under a different Mac user account, with a different port number configured.
To use a different port, append the port number to the host name: <hostname>:<port number>.
Note: Make sure to configure the same port number on the Mac.
UFT One version 2022 and later: The port number is configured in the Port option in the preferences of Micro Focus UFT Agent Safari extension.
UFT One version 2021 and earlier: The port number is configured in the UFT port option in the preferences of UFT Connection Agent.
See Install and configure the Micro Focus UFT Agent Safari extension on Mac.