You can use the QuickTest Professional automation object model to write scripts that automate your QuickTest operations. The QuickTest automation object model provides objects, methods, and properties that enable you to control QuickTest from another application.
VarDropDown.fAnchorOpen("exwp184852", false);What is Automation? VarDropDown.fAnchorClose("exwp184852", false);VarDropDown.fDIVOpen("exwp184852", false);
Automation is a Microsoft technology that makes it possible to access software objects inside one application from other applications. These objects can be created and manipulated using a scripting or programming language such as VBScript. or VC++. Automation enables you to control the functionality of an application programmatically.
An object model is a structural representation of software objects (classes) that comprise the implementation of a system or application. An object model defines a set of classes and interfaces, together with their properties, methods and events, and their relationships.VarDropDown.fDIVClose();
VarDropDown.fAnchorOpen("exwp184863", false);What is the QuickTest Automation Object Model? VarDropDown.fAnchorClose("exwp184863", false);VarDropDown.fDIVOpen("exwp184863", false);
Essentially all configuration and run functionality provided via the QuickTest interface is in some way represented in the QuickTest automation object model via objects, methods, and properties. Although a one-on-one comparison cannot always be made, most dialog boxes in QuickTest have a corresponding automation object, most options in dialog boxes can be set and/or retrieved using the corresponding object property, and most menu commands and other operations have corresponding automation methods.
You can use the objects, methods, and properties exposed by the QuickTest automation object model, along with standard programming elements such as loops and conditional statements to design your script.
Automation scripts are especially useful for performing the same tasks multiple times or on multiple components, or quickly configuring QuickTest according to your needs for a particular environment or application.
For example, you can create and run an automation script. from Microsoft Visual Basic that loads the required add-ins for a component, starts QuickTest in visible mode, opens the component, configures settings that correspond to those in the Options, Business Component Settings, and Record and Run Settings dialog boxes, runs the component, and saves the component.
You can then add a simple loop to your script. so that your single script. can perform. the operations described above for multiple components.
You can also create an initialization script. that opens QuickTest with specific configuration settings. You can then instruct all of your testers to open QuickTest using this automation script. to ensure that all of your testers are always working with the same configuration.VarDropDown.fDIVClose();
来自 “ ITPUB博客 ” ，链接：http://blog.itpub.net/16792402/viewspace-571180/，如需转载，请注明出处，否则将追究法律责任。