How UFT Did Record a Script?
Starting from the moment when the Record button is clicked till the moment, the stop button is clicked UFT as a record all the user actions as you navigate through your website or application and generates a script. User actions can be seen in the script as steps.
A step is anything that the user does that changes the content of a page or object in your application, like for example, clicking a link or typing data in an edit box.
Steps for Record and Playback are as follows:
Step 1: Click on “New” test from the Start Page
Step 2: Upon Clicking, “New” Link, the new test window opens and the user need to select the test type. Select “GUI Test“, give a name for the test and also the location where it needs to be saved.
Step 3: Once a New test is created, the new test screen opens. Now, click on “Action1” Tab which is created with 1 action by default.
Step 4: Click on “Record” Menu and select “Record and Run Settings”.
Step 5: The Record and Run Settings Dialog open and based on the type of application, one can select i.e. Web, Java, Windows Applications. Record & Run settings show a tab corresponding to add-ins installed and loaded for your test.
For example, if you have SAP Add-in Installed and loaded, you will see an SAP tab. The Windows Application tab is always available and is used in environments, such as Visual Basic, ActiveX, and terminal emulators.
For any Environment, the Record and Run settings can be classified into two generic groups:
- Record & Run Test on ANY Open Browser belonging to that particular environment.
- Record & Run on a SPECIFIC window belonging to that particular environment – which is the recommended Option.
Let’s stick to default settings. UFT remembers and uses the same settings for additional record sessions on the same test, unless you manually open the Record and Run Settings dialog box to modify the settings. For Example, We will record a Web Based Application http://noorhossin.com/. Put this in the address box.
Step 6: Click Record Button, the Internet Explorer opens automatically with the web address http://noorhossin.com/ as per the settings. Click “VBScript” link under “UFT” and then click “Continue Reading →” link under Conditional Statement. Click on “ALM” at the right of Conditional Statement page.
Upon completion of the action, click “Stop” button in the recording panel. You will notice that the script is generated as shown below:
Browser(“QA Engineering And Web”).Page(“QA Engineering And Web”).Link(“Continue Reading →”).Click
Browser(“QA Engineering And Web”).Page(“Different Types of Checkpoints”).Link(“UFT”).Click
Browser(“QA Engineering And Web”).Page(“UFT | NH-TECH”).Link(“Continue Reading →”).Click
Browser(“QA Engineering And Web”).Page(“Different Types of Recording”).Sync
Browser(“QA Engineering And Web”).CloseAllTabs
How UFT Did Play Back the Recorded Script?
Step 7: Now play back the script by clicking on the playback button. The Script replays and result is displayed.
Step 8: The result window is opened by default which exactly shows the timestamp of execution, passes and failed steps.