Chapter 1, Building a Scalable Selenium Test Driver Class for Web and Mobile Applications, shows users how to get started with designing and building the Selenium Framework driver class. This class is the engine that drives the browser and mobile applications. With Selenium WebDriver technology, users can test all the popular browsers and mobile devices using the same driver class and programming language. The Selenium WebDriver technology is platform independent and has various language bindings to support cross-browser and device testing in a single code base.
Chapter 2, Selenium Framework Utility Classes, describes how to design Java utility classes to support the framework components that are non-specific to any of the applications under test. Users will learn how to build classes to perform file I/O operations, data extraction, logging, synchronization, result processing, reporting, global variables, and many more.
Chapter 3, Best Practices for Building Selenium Page Object Classes, introduces users to designing and building application-specific classes following the Selenium Page Object Model. Users will be guided through designing abstract base classes, deriving subclasses, and structuring classes to use common inheritance methods to ensure that page elements and methods are stored in central locations. In following these design principles, users will create an abstract separation layer between the page object and test classes in the framework.
Chapter 4, Defining WebDriver and AppiumDriver Page Object Elements, presents users with design techniques to ensure that elements are defined using best practices for locators, minimum number of elements defined in page object classes, how to build locators on the fly, and when to use static verses dynamic locators to test page object elements.
Chapter 5, Building a JSON Data Provider, explains how to design and build a TestNG DataProvider class using the JSON protocol to store data. The concept of data-driven test frameworks is introduced, and how to use a DataProvider to extract data on the fly to ensure that standards for data encapsulation and DRY approaches are being followed is covered.
Chapter 6, Developing Data-Driven Test Classes, explores how to design data-driven test classes using the TestNG technologies. This includes TestNG features such as annotations, parameters, attributes, use of DataProviders in test classes, data extraction, exception handling, and setup/teardown techniques.
Chapter 7, Encapsulating Data in Data-Driven Testing, describes the use of encapsulation in data-driven testing. This will include JSON data manipulation, use of property files, processing JVM arguments, casting JSON data to Java objects, supporting multiple drivers, and parallel testing.
Chapter 8, Designing a Selenium Grid, presents the Selenium Grid Architecture, including designing a virtual grid in the Cloud, how to build the grid hub, browser nodes, and Appium mobile nodes, using the grid console, how to cast tests to the RemoteWebDriver, and supporting third-party grids.
Chapter 9, Third-Party Tools and Plugins, details methodologies in using third-party tools and plugins in the Selenium Framework design. This will include the IntelliJ IDEA Selenium plugin, TestNG for results processing, the HTML Publisher Plugin, BrowserMob, ExtentReports, and Sauce Labs.
Chapter 10, Working Selenium WebDriver Framework Samples, provides users with a real working sample framework including Selenium driver and utility classes, page object base and subclasses, DataProvider class, data-driven test class, JSON data file, TestNG test IListener class, and ExtentReports IReporter classes. Users will be able to install the files in their own project, use the supplied Maven pom.xml file to pull down the required JAR files, and run the sample data-driven tests against a real practice website across multiple browser types.