Inserting a Call to a New Action
Now you will insert a call to a new action and record the step of returning to the Mercury Tours home page so that the entire test begins and ends on the same page.
Insert the ReturnHome action.Choose Insert > Call to New Action or click the Insert Call to New Action button . The Insert Call to New Action dialog box opens.
Enter ReturnHome in the Name box, confirm that At the end of the test is selected, and click OK. The dialog box closes and the ReturnHome action is added to the end of your test.
Prepare the application for recording.
Confirm that your Web browser is open to the Flight Finder page.
If your browser is not open, open it to the Mercury Tours site (http://newtours.mercury.com) and sign in. The Flight Finder page opens.
Position the applications on your desktop so that you can see both QuickTest and the Web browser.
Change the Record and Run settings.Currently, your Record and Run settings are set so that a new browser opens each time you begin recording your test. However, because you want to record a step on a browser that you have already opened and prepared, you need to change the Record and Run settings before you begin recording.
In QuickTest, choose Automation > Record and Run Settings.
The Record and Run Settings dialog box opens.
In the Web tab, select Record and run test on any open browser and click OK.
Record the ReturnHome action.In the Keyword View, select the new ReturnHome action icon.
Choose Automation > Record or click the Record button .
Click the Home navigation link on the left side of the Flight Finder page. The Mercury Tours home page opens.
In QuickTest, click Stop to stop the recording process.
Return the Record and Run Settings to their original settings.You changed the record and run settings for the purposes of recording the ReturnHome action, but this change also affects the way QuickTest runs the test. You want QuickTest to open a new browser to the Mercury Tours home page when you run the test, so you need to reapply the original settings.
Choose Automation > Record and Run Settings. The Record and Run Settings dialog box opens.
In the Web tab, select Open the following address when a record or run session begins. Confirm that http://newtours.mercury.com is displayed in the first box and click OK.
Save the test.Choose File > Save or click the Save button .
Insert the ReturnHome action.Choose Insert > Call to New Action or click the Insert Call to New Action button . The Insert Call to New Action dialog box opens.
Enter ReturnHome in the Name box, confirm that At the end of the test is selected, and click OK. The dialog box closes and the ReturnHome action is added to the end of your test.
Prepare the application for recording.
Confirm that your Web browser is open to the Flight Finder page.
If your browser is not open, open it to the Mercury Tours site (http://newtours.mercury.com) and sign in. The Flight Finder page opens.
Position the applications on your desktop so that you can see both QuickTest and the Web browser.
Change the Record and Run settings.Currently, your Record and Run settings are set so that a new browser opens each time you begin recording your test. However, because you want to record a step on a browser that you have already opened and prepared, you need to change the Record and Run settings before you begin recording.
In QuickTest, choose Automation > Record and Run Settings.
The Record and Run Settings dialog box opens.
In the Web tab, select Record and run test on any open browser and click OK.
Record the ReturnHome action.In the Keyword View, select the new ReturnHome action icon.
Choose Automation > Record or click the Record button .
Click the Home navigation link on the left side of the Flight Finder page. The Mercury Tours home page opens.
In QuickTest, click Stop to stop the recording process.
Return the Record and Run Settings to their original settings.You changed the record and run settings for the purposes of recording the ReturnHome action, but this change also affects the way QuickTest runs the test. You want QuickTest to open a new browser to the Mercury Tours home page when you run the test, so you need to reapply the original settings.
Choose Automation > Record and Run Settings. The Record and Run Settings dialog box opens.
In the Web tab, select Open the following address when a record or run session begins. Confirm that http://newtours.mercury.com is displayed in the first box and click OK.
Save the test.Choose File > Save or click the Save button .
Comments
Post a Comment