Micro Focus Expert
Micro Focus Expert

<UFT Support Tip> How to run the web test in PhantomJS headless web browser?

Here are the steps necesary to ensure the web test will properly execute in PhantomJS browser:

  1. Download and install PhantomJS (it can be downloaded from http://phantomjs.org/download.html)
  2. Normally the downloaded bits is a .zip file extract to the folder of choice and ensure that the operating system path variable includes the …\bin folder where the PhantomJS files will reside
  3. To verify the Operating System can find the PhantomJS.exe then open command prompt and type PhantomJS –version the version number should be displayed. This is important as UFT will need to locate the PhantomJS.exe to be able to run the test in that browser
  4. Since PhantomJS is a headless browser (it does not have a GUI) it’s necessary to create a web test in a browser that can support recording, if recording mechanism is being used.
  5. Test the replay is correct in the browser of choice
  6. To run the test in PhantomJS browser, select it in the Tools then Record and Run Settings, if it does not appear review bullet points 2. And 3.
  7. Run the test and check results.


Labels (1)
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.