Before the introduction of UFT, QTP could only do recording on the Internet Explorer browser. However, QTP was able to playback the same recorded scripts on different browsers like Google Chrome, Mozilla Firefox, etc. Moreover UFT has further enhanced its features and become and a very powerful automation tool loaded with lots of features and capabilities.
- Microsoft Internet Explorer (32 bit)
- Microsoft Internet Explorer (64 bit)
- Google Chrome
- Mozilla Firefox
- Apple Safari(on remote Mac Machine)
- Chrome Emulator
- Phantom JS
In this tutorial, I will show you how to use UFT Record and Run Settings to record a script on the UFT supported browsers. The following is the example to record a script on Chrom browser. However, you can follow the same steps to record and run the script on other browsers by selecting the required browser in UFT Record and Run Settings.
How to Record a script in Chrome Browser in UFT
Now if you start recording, UFT will automatically invoke the specified browser and open the provided URL. It will identify the objects in the same fashion as it does on Internet Explorer. You can also see the number of steps recorded on this floating bar.
How to Run a script on the desired browser Using Code
SystemUtil.Run "C:\Program Files\Internet Explorer\iexplore.exe", "http://newtours.demoaut.com/"
SystemUtil.Run "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe", "http://newtours.demoaut.com/"
Here I have shown the example of opening the HPE demo mercury application on internet explorer and Google Chrome. These scripts run successfully on both browsers without any issue. In the same fashion, you can invoke any supported browser by UFT and run your automation scripts. You can write the rest of the automation script after invoking the desired URL on the required browser.
Note: You can use UFT Record and Run Settings if you are a novice on UFT and trying to learn UFT. Having said that, one should control the automation script flow rather than UFT record and run settings.
- Descriptive Programming in UFT with Examples
- How to Use Virtual object in UFT to Identify Non-Standard Class Objects
- File System Object in UFT | VBA
- How to Use Regular Expression in UFT to Identify an Object
- How to Use Environment Variables in UFT
- Settings.WebPackage Replaytype in UFT
- Understand Local And Shared Object Repository in UFT
- How to Use Recovery Scenario in UFT with Example