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.

Prerequisite

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.

Back to top

Control the connection to the Mac while designing your test

  1. Click the ALM Connection down arrow in the UFT One toolbar and select Remote Connection.

  2. 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.

  3. (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.

  4. 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.

  5. 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.

Back to top

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.

    1. In the Web tab, select Open the following browser when a record or run session begins.

    2. Select Apple Safari (on remote Mac computer) from the list of browsers.

    3. Set the host (and port) information.

    4. Select whether to initiate an SSL connection.

    5. 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.

Back to top

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.

Back to top

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.

Back to top