<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:
- Download and install PhantomJS (it can be downloaded from http://phantomjs.org/download.html)
- 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
- 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
- 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.
- Test the replay is correct in the browser of choice
- 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.
- Run the test and check results.