Automation Object Model

Just as we use QTP to automate testing of our application, we can use Automation Object Model (AOM) of QTP to automate QTP operations.

Using the objects, methods, and properties exposed by the QuickTest automation object model, we can write programs that configure QuickTest options and run tests or components instead of performing these operations manually using the QuickTest interface.

 We can see Generate Script button in the Properties tab of the Test Settings dialog box, the General tab of the Options dialog box, and the Object Identification dialog box. Clicking this button generates an automation script file (.vbs) containing the current settings from the corresponding dialog box.

The generated script will follow the Automation Object Model and it will be useful for transferring setting in one instance of QTP into other instances.

 For example, assume that you are working in your local computer , and you made some changes in the QTP interface.  Once you complete your development in your local machine I will move the scripts to your customer machine. The script may NOT work in your customer machine.

 In this case we need to use this generated script to keep same settings in your customer machine also.

 AOM scripts are useful for scheduling QTP script executions. We will see about this in another chapter.

Leave a Reply