更新时间:2021-06-30 19:30:32
coverpage
Title Page
Dedication
Packt Upsell
Why subscribe?
PacktPub.com
Contributors
About the author
About the reviewer
Packt is searching for authors like you
Preface
Who this book is for
What this book covers
To get the most out of this book
Download the example code files
Conventions used
Get in touch
Reviews
Building a Scalable Selenium Test Driver Class for Web and Mobile Applications
Introduction
Data-driven testing
Selenium Page Object Model
DRY
What you will learn
The singleton driver class
Requirements
The class signature
Class variables
JavaDoc
Parameters
Class methods
Using preferences to support browsers and platforms
Browser preferences
Platforms
Using preferences to support mobile device simulators emulators and real devices
iOS preferences
Android preferences
Multithreading support for parallel and distributed testing
Passing optional arguments and parameters to the driver
varargs
The parameter for setDriver
JVM argument – -Dswitch
Parameter processing methods
Selenium Grid Architecture support using the RemoteWebDriver and AppiumDriver classes
Third-party grid architecture support including the Sauce Labs Test Cloud
Using property files to select browsers devices versions platforms languages and many more
Summary
Selenium Framework Utility Classes
Global variables
Synchronization utility classes
Selenium synchronization classes
The ExpectedConditions class
WebDriverWait/FluentWait classes
Custom synchronization methods
The JavascriptExecutor class
The TestNG Listener class
Building the test listener class
Logging the results to the console or log file
Including the test runner in the test class or suite
File I/O class
Property files
Lookup table files
CSV files
Log files
The image capture class
The capture screen method
The capture image method
The compare image method
The reporter class
The JavaMail class
Best Practices for Building Selenium Page Object Classes
Best practices for naming conventions comments and folder structures
Naming conventions
Comments
Folder names and structures
Designing and building the abstract base classes for the AUT
The abstract class
Abstract methods
Common locators
Common methods
Wrap up on base classes
Designing and building subclasses for feature-specific pages using inheritance techniques
Encapsulation and using getter/setter methods to retrieve objects from the page object classes
Exception handling and synchronization in page object class methods
Implicit exception handling
TestNG difference viewer
Explicit exception handling
Try...catch exception handling
Synchronizing methods
Table classes
Defining WebDriver and AppiumDriver Page Object Elements
Inspecting page elements on browser applications
Types of locators
Inheriting WebElements