
Selenium Framework Design in Keyword-Driven Testing
US$ 19.95
The publisher has enabled DRM protection, which means that you need to use the BookFusion iOS, Android or Web app to read this eBook. This eBook cannot be used outside of the BookFusion platform.
Description
Contents
Reviews
Language
English
ISBN
9789389328202
Cover Page
Title Page
Copyright Page
Dedication
About the Author
Acknowledgement
Preface
Errata
Table of Contents
1. First Look at Selenium WebDriver and WebElements
Structure
Objective
Tools available for test automation
What’s new in Selenium 3.X
APIs that confirm to W3C
Advanced functionalities supported
Introduction of Appium project
Selenium WebDriver architecture
Selenium Server
Selenium IDE
Main interfaces of Selenium WebDriver
Property or attribute of WebElements
Accessing WebElements
Accessing the various attributes of WebElements
Maven
Creating a Maven project in Eclipse
Manual configuration
Introduction to the testingautomation framework
Keyword -driven framework
Introduction to JSON
Database table structures
Basic insert operation on JSONArray
Conclusion
Questions
2. Looking at the Various WebDrivers
Structure
Objectives
What is a driver instance?
Firefox Driver
What is a Firefox Profile?
Adding an extension
Storing and retrieving Profiles
Understanding Firefox preferences
Setting preferences
Firefox in headless mode
Chrome driver
Chrome options
Chrome extensions
Chrome in headless mode
Internet Explorer Driver
IEDriver capabilities
Microsoft Edge Driver
Safari Driver
A small code example
Introducing WebDriverManager library
How to use the WebDriverManager library
WebDriverManager as a Java dependency
WebDriverManager server
Conclusion
Questions
3. A Brief Look at Java 8
Structure
Objectives
What is a functional programming
Pure functions
Higher-order functions
Functions as parameters
Functions as return values
Functions as first class objects
Functional interface
Lambda expressions
Streams
Stream operations
Intermediate operations
Terminal operations
Filtering WebElements and extracting the count
Fetching elements based on attributes
Introducing method references
Referencing a static method
Referencing an instance method
Referencing a constructor
Performing actions on WebElements
How to use the map function to get the text value of elements
Conclusion
Questions
4. Deep Dive into Selenium WebDriver
Structure
Objectives
ThreadLocal class
Using ThreadLocal
Framework design
Framework architecture
ActionKeywords class
FrameworkDriver class
Singleton pattern?
Creating a Singleton driver
Handling pop-up windows
Window handles
The Set interface
Handling Alerts
Steps to handle Alerts
Handling frames/iFrames
Steps to handle frames/iFrames
Steps to handle nested frames/iFrames
What is synchronization?
Synchronization at WebDriver instance level
Implicit wait
PageLoad Timeout
Synchronization at WebElement level
Explicit wait
Fluent wait
Handling AJAX calls
Differences between get() and navigate()
Conclusion
Questions
5. Actions Class and the Javascript Executor
Structure
Objectives
What are advanced interactions?
Understanding the Actions class
A small example to demonstrate the Actions class
Drag and drop example to demonstrate the Actions class
Pressing a key combination example
Click and hold action
The JavascriptExecutor class
Creating customized classes for Actions and JavascriptExecutor
Integrating with the framework
Conclusion
Questions
6. WebDriver Events
Structure
Objectives
What are the events in Selenium WebDriver?
Introducing the EventFiringWebDriver class
Introducing the WebDriverEventListener interface
Introducing the AbstractWebDriverEventListener class
Process of event handling
Extending the AbstractWebDriverEvent Listener abstract class
Registering more than one listener to the EventFiringWebDriver instance
Introducing the Log4J framework
Steps to include Log4J in code
Integrating with the framework
Different WebDriver event listeners
WebElementsearch
WebElement click
WebElement value changes
Navigating back
Navigate forward
Navigate to
Script execution
Listening for exception
Conclusion
Questions
7. Database Operations
Structure
Objectives
CRUD operations?
Creating the database and tables
Create testconfig table
Create testcases table
Create testdata table
Create object_repository table
Understanding JOINS
Inner Join
Outer Joins
Inserting new testcases
Extracting records from a database in a single query
Creating a class for database operations
Introducing RowSet
Connected RowSetobjects
Disconnected RowSetobjects
CachedRowSet
Database extract in a method
Integration with the framework
Conclusion
Questions
8. Get Introduced to TestNG
Structure
Objectives
What is a testing framework?
What is TestNG
Configure TestNG
Understanding TestNG XML
What are the Test classes?
Learning TestNG annotations
Parameterization using testng.xml
Data Providers
TestNG listeners
ISuiteListenerinterface
ITestListenerinterface
Conclusion
Questions
9. Parallel Execution
Structure
Objectives
What are TestNG groups?
TestNG XML for incorporating groups
Introduction to parallel execution
Changes to the database for parallel execution
Conclusion
Questions
10. Understanding Maven
Structure
Objectives
Introducing Maven
Setting up Maven
Maven build life cycle
Maven phases
Maven command line calls
Plugin goals
Setting up your project to use the build lifecycle
Packaging
Plugins
Maven Compiler plugin
Maven SureFireplugin
Using Suite XML files
Specifying test parameters
Using the DataProvider to pull in the included group
Assertions in TestNG
Hard assertion
Soft assertion
Class for assertions
Introducing extent reports
Advantages of using extent reports
Components of extent reports
Maven dependency for extent reports
Generating extent reports
Integration with GitHub
Conclusion
Questions
11. Jenkins Introduction and Scheduling
Structure
Objectives
Introducing Jenkins
Setting-up Jenkins
Execute a Maven Build from the command line
Creating a Jenkins job
Configuring extent report in Jenkins
Scheduling a Jenkins job to build periodically
Conclusion
Questions
12. Selenium Grid and Executing in the Cloud
Structure
Objectives
Introducing RemoteWebDriver
Learning about Selenium standalone server
Starting the server
Learning about the RemoteWebDriver client
Steps to convert a regular script to use RemoteWebDriverServer
Understanding the Selenium Grid
Looking at the hub
Knowing the node
Hub configuration parameters
WaitTimeout of a new session
Waiting for DesiredCapability match
Node configuration parameters
Changing the default number of browsers
Node timeouts
Browser timeouts
Registering a node automatically
Unregister an unavailable node
Specifying configuration using JSON files
Changes to the SingletonDriver class
Changes to the setDriver method
Changes to the TestNG XML
Class for default global variables
Fetching runtime parameters
Introducing BrowserStack
Setting-up BrowserStack
Conclusion
Questions
13. Mobile Test Automation Using Appium
Structure
Objectives
Types of mobile applications
Introduction to Appium
Learning about Appium architecture
Understanding UIAutomator2
Understanding XCUITest
Setting up Appium
Using NodeJS to install Appium
Downloading Appium desktop client
Start the Appium Server
Connecting a real Android device on Windows
Creating a simple test
Changes for the framework
Changes to the SingletonDriver class
Conclusion
Questions
14. A Look at Selenium-4
Structure
Objectives
Changes related to taking screenshots
Taking a screenshot of a single web element or a section
Switching to the parent frame directly
Selenium Grid-4
Standalone mode
Hub and node
Fully distributed
New locators
Using artificial intelligence with Selenium
Visual validation
Exploring Applitools Eyes
Self-correcting tests
Auto coders
Improved Docker support
Next steps
Conclusion
Questions
The book hasn't received reviews yet.