This chapter describes how to use classes in VBScript, along with some very useful and illustrative implementation examples. Classes are a fundamental feature of object-oriented programming languages such as C++, C#, and Java. Classes enable us to encapsulate data fields with the methods and properties that process them, in contrast to global variables and functions scattered in function libraries. UFT already uses classes, such as with reserved objects (refer to Chapter 8, Utility and Reserved Objects), and Test Objects are also instances of classes. Although elementary object-oriented features such as inheritance and polymorphism are not supported by VBScript, using classes can be an excellent choice to make your code more structured, better organized, and more efficient and reusable.
Advanced UFT 12 for Test Engineers Cookbook
Advanced UFT 12 for Test Engineers Cookbook
Overview of this book
Table of Contents (18 chapters)
Advanced UFT 12 for Test Engineers Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Free Chapter
Data-driven Tests
Testing Web Pages
Testing XML and Database
Method Overriding
Object Identification
Event and Exception Handling
Using Classes
Utility and Reserved Objects
Windows Script Host
Frameworks
Design Patterns
Index
Customer Reviews