UFT 12 – How to run HP UFT GUI on a Mac using Safari

Automation Guild Online Conference Top ad

How to use UFT 12's new functionality to run UFT script on a Remote Mac in Safari

If you listened to my recent podcast episode on the top new feature for UFT 12 you may have heard that UFT 12 now supports running UFT GUI test on a remote Mac in an Apple Safari browser.

Using this new technology preview feature you can have UFT use the WebSockets protocol to connect to any Mac machine that you specify. The current limitation is that you can only run Web based test objects with this feature. All the other test object types like Utility will not work on the remote machine.



Getting Started

First we need to install the UFTConnectinAgent on our Remote mac machine.

  • Copy the UFTConnectionAgent.dmg to your mac machine. Under your

Unified Functional Testing/MSI/HP/Unified Functional Testing/Installation/Safari


Steps to Perform on Your Mac

  • On your Mac install the UFTConnectionAgent.dmg
  • Take the defaults in the HP UFT Connection Agent wizard


    • Click Install if you receive the pop-up message Are you sure you want to install the extension message


    • In your System Preferences you should now have a HP UFT Connection Agent option

    \

    • Open the HP UFT Connection Agent. You should have the following options:
      • Make sure the Enable agent is selected and the agent is running before you try to connect UFT. For security reasons HP recommends turning on the Disable agent when you are not using it.
      • Listening port: this is the port you will use along with your mac's name or IP to connect UFT
      • Log Folder: this is the location where the agent will create log files. Make sure that you have rights to this location
      • Agent log level – creates a log file name uftagent.log located in the log folder
      • UFT Safari extension logs: this should be turned OFF unless HP request it for troubleshooting issues


Cool – so once the agent is installed on your mac machine head on over to your UFT machine.

Steps to Perform on Your UFT machine

  • In UFT create a new UFT GUI tests name RemoteMac
  • Click on the Remote Connection button under the UFT toolbar


  • Enter your mac's host name or IP address. (To find you mac's name go to System Preferences>
    Sharing. To find you're your mac's IP go to System Preferences>Network)
  • Click Connect


  • The host name did not work for me but using my mac's IP address did. If UFT found the remote machine, a green check mark with the status of Connected should appear.


Create a test to run a UFT tests in Safari on you mac

For a simple example lets create a script that opens up Safari and navigates to my site

  • Under UFT's Recording menu select Record and Run Settings


  • Under the Record and Run Settings enter:
    • Open the following address: http://www.joecolantonio.com
    • Open the following browser: Apple Safari (on remote mac computer)
    • Remote Connection Details: make sure that your mac's name or ip is filled in
    • Click OK


  • Now click Run and watch the magic
  • UFT should connect to the mac and bring up joecolantonio.com in Safari.

17 comments
prerna - April 13, 2014

In System Preferences when I double click on the HP UFT Connection Agent, I get a pop up message Preference Error You can’t open HP UFT Connection Agent preferences because it doesn’t work on an Intel-based Mac. …..any idea how to get rid of this??

Reply
    Satish - January 6, 2015

    Have you installed Mac OS on a windows based machine? That could be the reason

    Reply
Ikbal - July 18, 2014

Hello,

Please I need your help, I want to install HP UFT in Mac but I can’t get the right file HP UFT Connection Agent.dmg I have it .pkg.

Thanks,

Reply
    Joe Colantonio - July 18, 2014

    Sorry not sure I understand your question – you are looking for the UFTConnectionAgent.dmg? You are using UFT 12 correct? IF so it should be located in the UFT install under: Unified Functional Testing/MSI/HP/Unified Functional Testing/Installation/Safari

    Reply
      Ikbal - July 20, 2014

      Yeah sorry I didn’t asked the question correctly.
      In fact, when I want to install HP UFT Connection Agent.pkg, I have this error message:
      “HP UFT Connection Agent.pkg ne peut être installé car sa signature numérique n’est pas valide.”
      –Le paquet a été signé avec un certificat révoqué. Il est possible que ce paquet installe un contenu différent de vos attentes. Procurez-vous une nouvelle copie du paquet et essayez de nouveau–

      Thank you ^^,

      Reply
Bhonsle - August 4, 2014

Hi Joe,

Good explanation.
I would like to know if UFT could support “record & run” feature on Mac, which am not very sure other than the support existing for web app testing. Thanks for all the good things you bring thru.

Regards

Reply
premkumar - November 6, 2014

Is we able to handle safari popups on mac using UFT 12.0 feature?

Is any technical documentation or workaround is ready for this ?

Reply
arun - February 23, 2015

Shall we do our own scripting in the UFT machine and run the same in MAC ? Or Record and playback is the only way to run scripts? Is there any other way to run scripts through ALM ?

Reply
arvind - July 15, 2015

I wanted to execute UFT 12.2 automated test suite on remote MAC Safari. However the connection has been established by following above mentioned instructions and URL has been opened using record & run setting But UFT is giving the error message while performing user actions.
The error message is “cannot communicate with browser on remote machine. Make sure that UFT agent is installed on the browser and its remote agent port settings are correct”
Any idea, how to set-up correct remote port settings.

Reply
Rajesh - November 28, 2015

The link “top new feature for UFT 12” above is taking to homepage of this website?

Reply
APR - May 13, 2016

Hi Joe,

Excelent Post!! Thank you!
My test must run on Safari and Edge, I need populate the remote connection with code…
It’s possible configure the remote desktop programmatically?

Thank you
APR

Reply
    Joe Colantonio - May 19, 2016

    Thanks APR – There is not a way to programmatically do this that I’m aware of. But I’m not 100% sure – my guess would be that it is not possible at least I can’t find any documentation on HP KB on how to do this or if its possible.

    Reply
kapil - June 14, 2016

All-Ppl who are facing issue with agent not running ,please check OS version ,
If os version is El captain Mac osx ,please follow steps as per http://mastalerz.it/kategoria/certificates/testing/

Then apply and restart Agent should run.

Reply
Click here to add a comment

Leave a comment: