Wednesday, 23 January 2013

Lesson 4 - Recording Script

Before you start recording make test setting.
  • Choose Test > Automation > Record and Run Setting, The Record and Run Settings dialog box opens.
  • In the Web tab, select Open the following browser when a record or run session begins.
  • Choose a browser from the Type list and confirm that the URL in the Address box  for example . http://newtours.mercuryinteractive.com.
  • Confirm that Close the browser when the test is closed is selected.
  • In the Windows Applications tab, confirm that Record and run on these applications is selected, and that there are no applications listed.
  • This setting prevents you from inadvertently recording operations performed on various Windows applications (such as e-mail) during a recording session.
  • Click OK.
  • Click on Record button and your browser opens to the URL you specified.
  • Follow the actions specified in your test case and Record the script.
  • Once you finish recording ,click on stop button to stop recording.
  • Now Run your recorded script using Run Button and make necessary enhancements. 
Types Of Recording In QTP

Standard / Normal Recording:- Records the test in terms of GUI objects.In this mode QTP also captures unnecessary objects in script which are stored in object repository.It is the default mode of recording.

Analog Recording:-Exact keyboard and mouse operations are recorded  in accordance with the application or screen.

Low Level Recording:-It records at the object level and records all run-time objects as Window or WinObject test objects.Use it when QTP is not able to recognize object or environment.It is also useful for capturing objects which are location based.

You can use all recordings in single test based on the areas that you are covering in application.

No comments:

Post a Comment

Note: only a member of this blog may post a comment.