(Part 2) You Must Learn VBScript for QTP/UFT: Don't Ignore The Language For Functional Automation Testing
By Rex Jones
()
About this ebook
QTP/UFT Automation Engineers, Look No Further!
This is one of the best VBScript books specifically for QTP/UFT
Note: Book available on your tablet, phone, PDF, PC, Mac, and paperback (Black/White & Color). You will find details of downloading the PDF document inside the book.
3 Tips To Master QTP/UFT Within 30 Days
Why Read Part 2 – You Must Learn VBScript for QTP/UFT?
Part 2 of You Must Learn VBScript for QTP/UFT is designed to be an easy read so you can understand the deeper concepts of VBScript. VBScript is a powerful scripting language which imitates object oriented programming languages. An object oriented programming language is centered on and organized around objects.
Target Audience:
Mid-Level to Advanced QTP/UFT automation engineers
Note: It is recommended that beginners read "Part 1 – You Must Learn VBScript for QTP/UFT" to obtain a foundation of VBScript.
Don't Miss Out! Automation Engineers Interested in QTP/UFT Should Not Pass Up This Book Because You Will Learn:
- Dictionary Objects
- FileSystemObject (FSO)
- Classes
- Regular Expressions
- Debugging and Handling Errors
- Windows Script Host (WSH)
- Windows Management Instrumentation (WMI)
Scroll Up and Download Your Copy
Rex Jones
Rex Allen Jones II is a QA/Software Tester with a passion for sharing knowledge about testing software. He has been watching webinars, attending seminars, and testing applications since February 2005. Mr. Jones graduated from DeVry University in June 1999 with a Bachelor’s of Science degree in Computer Information Systems (CIS). Currently, Rex is a Consultant and former Board of Director for User Group: Dallas / Fort Worth Mercury User Group (DFWMUG) and member of User Group: Dallas / Fort Worth Quality Assurance Association (DFWQAA). In addition to his User Group memberships, he is a Certified Software Tester Engineer (CSTE) and has a Test Management Approach (TMap) certification. Mr. Jones’ advice for people interested in Functional Automation Testing is to learn the programming language. This advice led him to write two books “(Part 1 & Part 2) You Must Learn VBScript for QTP/UFT” geared towards VBScript which is the programming language for Unified Functional Testing (UFT) formerly known as Quick Test Professional (QTP). In addition, one book “Part 1 – Java 4 Selenium WebDriver” and an upcoming book “Part 2 – Java 4 Selenium WebDriver” geared toward Java which is one of the programming languages for Selenium.
Read more from Rex Jones
Absolute Beginner (Part 1) Selenium WebDriver for Functional Automation Testing Rating: 5 out of 5 stars5/5(Part 1) Absolute Beginner: Java 4 Selenium WebDriver: Come Learn How To Program For Automation Testing Rating: 5 out of 5 stars5/5(Part 1) You Must Learn VBScript for QTP/UFT: Don't Ignore The Language For Functional Automation Testing Rating: 5 out of 5 stars5/5(Part 2) Java 4 Selenium WebDriver: Come Learn How To Program For Automation Testing Rating: 0 out of 5 stars0 ratingsGetting Started With TestNG (A Java Test Framework) Rating: 0 out of 5 stars0 ratings
Related to (Part 2) You Must Learn VBScript for QTP/UFT
Related ebooks
(Part 1) Absolute Beginner: Java 4 Selenium WebDriver: Come Learn How To Program For Automation Testing Rating: 0 out of 5 stars0 ratings(Part 2) Java 4 Selenium WebDriver: Come Learn How To Program For Automation Testing Rating: 0 out of 5 stars0 ratingsPro TypeScript: Application-Scale JavaScript Development Rating: 4 out of 5 stars4/5Object-oriented Programming with Smalltalk Rating: 0 out of 5 stars0 ratingsSwift Programming Nuts and bolts Rating: 0 out of 5 stars0 ratingsiOS Programming Nuts and bolts Rating: 4 out of 5 stars4/5Using and Administering Linux: Volume 1: Zero to SysAdmin: Getting Started Rating: 0 out of 5 stars0 ratingsUsing and Administering Linux: Volume 3: Zero to SysAdmin: Network Services Rating: 0 out of 5 stars0 ratingsUsing and Administering Linux: Volume 2: Zero to SysAdmin: Advanced Topics Rating: 0 out of 5 stars0 ratingsBeginning App Development with Flutter: Create Cross-Platform Mobile Apps Rating: 0 out of 5 stars0 ratingsSwing Extreme Testing Rating: 4 out of 5 stars4/5C# for Beginners: Learn in 24 Hours Rating: 0 out of 5 stars0 ratingsRSpec Essentials Rating: 3 out of 5 stars3/5JavaScript Introduction Rating: 0 out of 5 stars0 ratingsJava™ Programming: A Complete Project Lifecycle Guide Rating: 0 out of 5 stars0 ratingsPython For Data Science Rating: 0 out of 5 stars0 ratings.Net Framework and Programming in ASP.NET Rating: 0 out of 5 stars0 ratingsLearn Rust Programming: Safe Code, Supports Low Level and Embedded Systems Programming with a Strong Ecosystem (English Edition) Rating: 0 out of 5 stars0 ratingsMATLAB Machine Learning Recipes: A Problem-Solution Approach Rating: 0 out of 5 stars0 ratingsEJB 3 Developer Guide Rating: 0 out of 5 stars0 ratingsReact and Libraries: Your Complete Guide to the React Ecosystem Rating: 0 out of 5 stars0 ratingsMootools 1.2 Beginners Guide LITE: Getting started Rating: 0 out of 5 stars0 ratingsExploring Windows Presentation Foundation: With Practical Applications in .NET 5 Rating: 0 out of 5 stars0 ratingsObjective-C Programming Nuts and bolts Rating: 0 out of 5 stars0 ratingsSelenium Testing Tools Interview Questions You'll Most Likely Be Asked: Second Edition Rating: 0 out of 5 stars0 ratingsMySQL Connector/Python Revealed: SQL and NoSQL Data Storage Using MySQL for Python Programmers Rating: 0 out of 5 stars0 ratingsSystemVerilog for Hardware Description: RTL Design and Verification Rating: 0 out of 5 stars0 ratingsHacking with Kali: Practical Penetration Testing Techniques Rating: 4 out of 5 stars4/5TypeScript Programming In Action: Code Editing For Software Engineers Rating: 0 out of 5 stars0 ratingsPractical Test Automation: Learn to Use Jasmine, RSpec, and Cucumber Effectively for Your TDD and BDD Rating: 0 out of 5 stars0 ratings
Computers For You
101 Awesome Builds: Minecraft® Secrets from the World's Greatest Crafters Rating: 4 out of 5 stars4/5Standard Deviations: Flawed Assumptions, Tortured Data, and Other Ways to Lie with Statistics Rating: 4 out of 5 stars4/5Slenderman: Online Obsession, Mental Illness, and the Violent Crime of Two Midwestern Girls Rating: 4 out of 5 stars4/5The ChatGPT Millionaire Handbook: Make Money Online With the Power of AI Technology Rating: 0 out of 5 stars0 ratingsElon Musk Rating: 4 out of 5 stars4/5The Invisible Rainbow: A History of Electricity and Life Rating: 4 out of 5 stars4/5Procreate for Beginners: Introduction to Procreate for Drawing and Illustrating on the iPad Rating: 0 out of 5 stars0 ratingsUltimate Guide to Mastering Command Blocks!: Minecraft Keys to Unlocking Secret Commands Rating: 5 out of 5 stars5/5Master Builder Roblox: The Essential Guide Rating: 4 out of 5 stars4/5CompTIA IT Fundamentals (ITF+) Study Guide: Exam FC0-U61 Rating: 0 out of 5 stars0 ratingsMastering ChatGPT: 21 Prompts Templates for Effortless Writing Rating: 5 out of 5 stars5/5SQL QuickStart Guide: The Simplified Beginner's Guide to Managing, Analyzing, and Manipulating Data With SQL Rating: 4 out of 5 stars4/5User Friendly: How the Hidden Rules of Design Are Changing the Way We Live, Work, and Play Rating: 4 out of 5 stars4/5Grokking Algorithms: An illustrated guide for programmers and other curious people Rating: 4 out of 5 stars4/5Everybody Lies: Big Data, New Data, and What the Internet Can Tell Us About Who We Really Are Rating: 4 out of 5 stars4/5The Hacker Crackdown: Law and Disorder on the Electronic Frontier Rating: 4 out of 5 stars4/5GarageBand Basics: The Complete Guide to GarageBand: Music Rating: 0 out of 5 stars0 ratingsCompTIA Security+ Practice Questions Rating: 2 out of 5 stars2/5Alan Turing: The Enigma: The Book That Inspired the Film The Imitation Game - Updated Edition Rating: 4 out of 5 stars4/5Learning the Chess Openings Rating: 5 out of 5 stars5/5Storytelling with Data: Let's Practice! Rating: 4 out of 5 stars4/5CompTIA Security+ Get Certified Get Ahead: SY0-701 Study Guide Rating: 5 out of 5 stars5/5Deep Search: How to Explore the Internet More Effectively Rating: 5 out of 5 stars5/5AP® Computer Science Principles Crash Course Rating: 0 out of 5 stars0 ratings
Reviews for (Part 2) You Must Learn VBScript for QTP/UFT
0 ratings0 reviews
Book preview
(Part 2) You Must Learn VBScript for QTP/UFT - Rex Jones
Free Webinars, Videos, and Live Training
Mr. Jones plans to have free step-by-step demonstration webinars, videos, and live trainings walking people through concepts of QTP/UFT and Selenium from A - Z. The material will teach/train individuals the fundamentals of the programming language, fundamentals of QTP/UFT and Selenium, and important concepts of QTP/UFT and Selenium. All of the webinars, videos, and live training will be directed toward beginners as well as mid-level automation engineers.
Sign Up to Receive
3 Tips To Master QTP/UFT Within 30 Days
http://tinyurl.com/3-Tips-For-QTP-UFT
3 Tips To Master Selenium Within 30 Days
http://tinyurl.com/3-Tips-For-Selenium
Free Webinars, Videos, and Live Trainings
http://tinyurl.com/Free-QTP-UFT-Selenium
Rex Jones’ Contact Information
Email Address: Rex.Jones@Test4Success.org
LinkedIn: https://www.linkedin.com/in/rexjones34
Twitter: @RexJonesII
Skype: rex.jones34
Table of Contents
Free Webinars, Videos, and Live Training
Rex Jones’ Contact Information
Table of Contents
Preface
About the Author
About the Editor
Copyright, Legal Notice, and Disclaimer
Acknowledgements
Chapter 1 Introduction
Overview
Dictionary Objects
FileSystemObject (FSO)
Classes
Regular Expressions
Debugging and Handling Errors
Windows Script Host (WSH)
Windows Management Instrumentation (WMI)
Chapter 2 Dictionary Objects
Dictionary Object Methods
Dictionary Object Properties
––––––––
Chapter 3 FileSystemObject (FSO)
FSO Objects
FSO Collections
Methods
Properties
Chapter 4 Classes
Class Statement
Class Properties
Class Methods
Class Events
Chapter 5 Regular Expressions
RegExp Object
RegExp Properties
RegExp Methods
Matches Collection Object
Match Object
Regular Expression Characters
Chapter 6 Debugging and Handling Errors
Error Types
Debugging
Error-Handling
Chapter 7 Windows Script Host (WSH)
WSH Object Models
WSH Properties
WSH Methods
Chapter 8 Windows Management Instrumentation (WMI)
WMI Architecture Layers
WMI Operating System Classes
Conclusion
Download PDF Version
Books by Rex Jones II
Sign Up To Receive
Preface
Part 2 – You Must Learn VBScript for QTP/UFT is a reference book for automation engineers. Automation engineers will need to understand the basics of VBScript to benefit from the contents of this book. VBScript enables automation engineers to accomplish many tasks and each task assists QTP/UFT with testing any Application Under Test (AUT).
Target Audience
The target audience is automation engineers with a solid foundation of VBScript. Automation engineers who occupy an understanding of variables, data types, operators, arrays, flow control, functions, and how to create/destroy objects. It is recommended to read Part 1 – You Must Learn VBScript for QTP/UFT, if an individual needs to gain a foundation in VBScript.
Purpose
The purpose of this book is to provide automation engineers with a deeper knowledge of VBScript. VBScript is a lightweight programming language that possesses powerful features. Features such as objects and regular expressions help VBScript emulate programming languages like Visual Basic. Learning some of the powerful features of VBScript facilitates several tasks to be created with less lines of code.
About the Author
Rex Allen Jones II is a QA/Software Tester with a passion for sharing knowledge about testing software. He has been watching webinars, attending seminars, and testing applications since February 2005. Mr. Jones graduated from DeVry University in June 1999 with a Bachelor’s of Science degree in Computer Information Systems (CIS).
Currently, Rex is a Sr. Consultant and former Board of Director for User Group: Dallas / Fort Worth Mercury User Group (DFWMUG) and member of User Group: Dallas / Fort Worth Quality Assurance Association (DFWQAA). In addition to his User Group memberships, he is a Certified Software Tester Engineer (CSTE) and has a Test Management Approach (TMap) certification.
Mr. Jones’ advice for people interested in Functional Automation Testing is to learn the programming language. This advice led him to write 4 programming books (Part 1 & Part 2) You Must Learn VBScript for QTP/UFT
and (Part 1 & Part 2) Java 4 Selenium WebDriver
. VBScript is the programming language for Unified Functional Testing (UFT) formerly known as Quick Test Professional (QTP) and Java is one of the programming languages for Selenium WebDriver.
About the Editor
sam.jpgWhen Samantha Mann is not improving the contents of a document through constructive editing marks and remarks, she is enjoying life as a professional in Dallas, Texas. Samantha is a User Experience guru in the realms of research and design, and works as an Information Technology consultant. Outside of work her hobbies include the typical nerd-type fun of freelance editing, reading, writing, and binge watching Netflix with her pitbull.
Connect with Samantha:
Samantha.danae.mann@gmail.com
https://www.linkedin.com/pub/samantha-mann/84/9b7/100
Copyright, Legal Notice, and Disclaimer
This publication is protected under the US Copyright Act of 1976. All rights are reserved including resale rights which applies to international, federal, state, and local laws. The purchaser is not allowed to share or sell this book to anyone.
Please note that much of this publication is based on personal experience and anecdotal evidence. The author has made every reasonable attempt to produce accurate content in this book. He assumes no responsibility for unknown errors or omissions. Therefore, the purchaser should use this information as he/she sees fit.
––––––––
Any trademarks, service marks, product names or named features are assumed to be the property of their respective owners and used only for reference.
Copyright © 2015 Test 4 Success, LLC. All rights reserved worldwide.
ISBN: 9781519973177
Acknowledgements
I would like to express my gratitude to my wife Tiffany, children Olivia Rexe’ and Rex III, editor Samantha Mann, family, friends, and the many people who provided encouragement. Writing this book took time and your support helped pushed this book forward.
––––––––
Thank You,
Rex Allen Jones II
Chapter 1
Introduction
Overview
There are many programming languages in the Information Technology (IT) industry. This multitude of languages makes a decision to learn a programming language overwhelming and difficult. However, QTP/UFT utilizes VBScript—a powerful scripting language. The first book (Free) Part 1—You Must Learn VBScript for QTP/UFT
sets the groundwork for this book Part 2—You Must Learn VBScript for QTP/UFT.
Part 1 explained Variables and Data Types, Operators, Arrays, Flow Control, Procedures – Functions, and how to Create and Destroy Objects. The final chapter Create and Destroy Objects
is an introduction for Part 2 chapters regarding "Dictionary Objects, FileSystemObject (FSO), and Classes."
This chapter provides an overview rather than details on the following topics by focusing on VBScript’s general concepts:
✓ Dictionary Objects
✓ FileSystemObject (FSO)
✓ Classes
✓ Regular Expressions
✓ Debugging and Handling Errors
✓ Windows Script Host (WSH)
✓ Windows Management Instrumentation (WMI)
Dictionary Objects
Dictionary objects are objects that store key/item pairs (see Dictionary Objects in Chapter 2.) The keys can be integers or strings while the items can be integers, strings, or arrays. Dictionary objects contains the following methods and properties:
Figure 1.1 – Dictionary Objects Methods and Properties
FileSystemObject (FSO)
FileSystemObject (FSO) accesses a computer’s file system via Drives, Folders, and Files (see FileSystemObject (FSO) in Chapter 3.) The Drive object provides information about drives connected to the system. All of the file properties are accessed by the File object. The Folder object provides a way to manipulate all of the folder properties. FileSystemObject (FSO) consists of FSO Objects, FSO Collections, Methods, and Properties.
Classes
Classes are templates for objects (see Classes in Chapter 4.) The following are covered in Classes:
Class Properties – stores data in an object or returns data from the object
Class Methods – operates like a procedure (Sub or Function)
Class Events – consist of two events Class Initialize and Class Terminate.) Class Initialize calls a specific class when an object is instantiated while Class Terminate destroys the object
Regular Expressions
Regular expressions are used for locating and/or replacing patterns (see Regular Expressions in Chapter 5.) A pattern is a combination of numbers, characters, and/or special characters forming a string. The RegExp object is a built-in object which makes regular expressions available for automation engineers. There are three RegExp object properties and three methods:
Figure 1.2 – RegExp Properties and Methods
Debugging and Handling Errors
Debugging is the process of locating and correcting errors, while error-handling is the anticipation, detection, and then resolution of errors in the code. (see Debugging and Handling Errors in Chapter 6.) There are three types of errors along with two elements for handling errors:
Error Types
Syntax – error that stop the execution of a program
Runtime – occurs when a program executes an invalid action
Logical – errors from an automation engineer’s programming code logic
Error-Handling Elements
Err Object –contains information about a runtime error
On Error Statement – regulates the error control settings
Windows Script Host (WSH)
Windows Script Host (WSH) is a Windows administration tool (automation technology) which creates an environment for hosting scripts (see Windows Script Host (WSH) in Chapter 7.) There are two interfaces for executing the scripts: cscript.exe and wscript.exe. CScript executes on the command line, while WScript executes within the Windows environment. The following are elements of Windows Script Host (WSH):
XML Elements
Objects