Mr. Jones plans to have free step-by-step demonstration webinars, videos, and live trainings walking people through concepts of Selenium and QTP/UFT from A - Z. The material will teach/train individuals the fundamentals of the programming language, fundamentals of Selenium and QTP/UFT, and important concepts of Selenium and QTP/UFT. All of the webinars, videos, and live training will be directed toward beginners as well as mid-level automation engineers.
Rex Jones Contact Information
Email Address:
LinkedIn: https://www.linkedin.com/in/rexjones34
Books: http://tinyurl.com/Rex-Allen-Jones-Books
Twitter: @RexJonesII
Skype: rex.jones34
Table of Contents
Preface
According to TIOBE , Java is the most popular programming language within the programming community. Therefore Java is a great language to learn in the world of automating applications. A core set of Java is necessary to be effective on automation projects. Part 2 Java 4 Selenium WebDriver provides a core set of Java plus concepts involving inheritance, packages, and much more.
Target Audience
The target audience is programmers with knowledge of variables, data types, operators, branches, and loops. It is recommended to read Part 1 Java 4 Selenium WebDriver, if an individual needs to gain a foundation in Java.
Purpose
The purpose of this book is to not overwhelm you with hundreds and hundreds of pages (known as information overload) regarding Java. However it will provide valuable information that is concise with straightforward definitions, examples, and figures. After reading Part 2 Java 4 Selenium WebDriver, a thorough understanding of Java and object-oriented programming will be in your possession.
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 Bachelors 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 books four 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.
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 2016 Test 4 Success, LLC. All rights reserved worldwide.
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 to Object-Oriented Programming
Object-Oriented Programming (OOP) is the most popular paradigm in programming. It is an approach to programming that centers around objects. As a result, identifying objects is one of the most essential principles in OOP. According to dictionary.com , an object is anything visible or tangible. Therefore objects can be a person, place, or thing whereby it is recognized in programming like the real world. All objects have two characteristics: state and behavior. State identifies the object and behavior represent the actions of the object.
Chapter 1 underlines object-oriented programming (OOP) by providing an overview of this book Part 2 Java 4 Selenium WebDriver :
Classes, Objects, and Methods
Java is an object-oriented programming (OOP) language containing classes, objects, and methods (see ). A class is a blueprint for creating an object and a method execute a job for the object. Classes include data and code that operate on the data. Objects serve as the foundation for OOP while methods perform actions. A methods responsibility is to instruct the program what action to perform and how to perform the action.
Arrays and Strings
In Java, arrays and strings are objects (see ). An array is a group of related variables with the same data type, same name, and fixed number of values. All items in the array are accessed by an index which starts at zero. On the other hand, a string is a group of unchangeable characters. Many methods are available for strings that facilitate an operation on the object.
Inheritance
Inheritance is a hierarchical concept which allows code and objects to be reused (see ). Each class allows other classes to inherit its code. As a result, the relationship between the classes are superclass and subclass. Superclass is the parent class and subclass is the child class. The classes maintain a certain amount data in common while holding unique characteristics.
Packages
A package is a collection of related classes (see ). The package is comparable to a folder and the classes are similar to files within the folder. Each class within the package can be accessed by the package name. It is important to know that a package must be imported if a class wants to use members from a different class.
Interfaces
An interface is a collection of related methods (see ). Generally, most interfaces do not include the body of a method. Therefore an interface method reveals what action to perform but not how to perform the action. This concept allows a class to implement the interface method and decide how to perform the action. Each class has the ability to implement a different action for the same interface method.
Errors, Exceptions, and Debugging
Errors are unavoidable problems in a program. New programmers as well as experienced programmers will face errors. are three types of errors in Java. Syntax errors stop the code from executing while runtime errors allow code to execute then generate an error. Logical errors are the most difficult errors to detect due to no error message during execution. The programmer must know what to expect in order to find and resolve a logical error.