Book description
Real-world examples of cross-browser, mobile, and data-driven testing with all the latest features of Selenium WebDriver 3
Key Features
- Unlock the full potential of Selenium to test your web applications
- Use Selenium Grid for faster, parallel running, and cross-browser testing
- Test iOS and Android Apps with Appium
Book Description
Selenium WebDriver is an open source automation tool implemented through a browser-specific driver, which sends commands to a browser and retrieves results. The latest version of Selenium 3 brings with it a lot of new features that change the way you use and setup Selenium WebDriver. This book covers all those features along with the source code, including a demo website that allows you to work with an HMTL5 application and other examples throughout the book.
Selenium WebDriver 3 Practical Guide will walk you through the various APIs of Selenium WebDriver, which are used in automation tests, followed by a discussion of the various WebDriver implementations available. You will learn to strategize and handle rich web UI using advanced WebDriver API along with real-time challenges faced in WebDriver and solutions to handle them. You will discover different types and domains of testing such as cross-browser testing, load testing, and mobile testing with Selenium. Finally, you will also be introduced to data-driven testing using TestNG to create your own automation framework.
By the end of this book, you will be able to select any web application and automate it the way you want.
What you will learn
- Understand what Selenium 3 is and how is has been improved than its predecessor
- Use different mobile and desktop browser platforms with Selenium 3
- Perform advanced actions, such as drag-and-drop and action builders on web page
- Learn to use Java 8 API and Selenium 3 together
- Explore remote WebDriver and discover how to use it
- Perform cross browser and distributed testing with Selenium Grid
- Use Actions API for performing various keyboard and mouse actions
Who this book is for
Selenium WebDriver 3 Practical Guide is for software quality assurance/testing professionals, software project managers, or software developers interested in using Selenium for testing their applications. Prior programming experience in Java is necessary.
Table of contents
- Title Page
- Copyright and Credits
- Packt Upsell
- Contributors
- Preface
-
Introducing WebDriver and WebElements
- Selenium Testing Tools
- Differences between Selenium 2 and Selenium 3
- Setting up a project in Eclipse with Maven and TestNG using Java
- WebElements
- Locating WebElements using WebDriver
- Interacting with WebElements
- Summary
- Questions
- Further information
- Different Available WebDrivers
- Using Java 8 Features with Selenium
- Exploring the Features of WebDriver
-
Exploring Advanced Interactions of WebDriver
- Understanding the build and perform actions
-
Learning mouse based interactions
- The moveByOffset action
- The click at current location action
- The click on a WebElement action
- The click and hold at current location action
- The click and hold a WebElement action
- The release at current location action
- The release on another WebElement action
- The moveToElement action
- The dragAndDropBy action
- The dragAndDrop action
- The double click at current location action
- The double click on WebElement action
- The context click on WebElement action
- The context click at current location action
- Learning keyboard-based interactions
- Summary
- Questions
- Further information
-
Understanding WebDriver Events
- Introducing the eventFiringWebDriver and eventListener classes
- Creating an instance of EventListener
-
Exploring different WebDriver event listeners
- Listening for WebElement value changes
- Listening for the clicked WebElement
- Listening for a WebElement search event
- Listening for browser back-navigation
- Listening for browser forward-navigation
- Listening for browser NavigateTo events
- Listening for script execution
- Listening for an exception
- Unregistering EventListener with EventFiringWebDriver
- Performing accessibility testing
- Capturing page-performance metrics
- Summary
- Questions
- Further information
- Exploring RemoteWebDriver
-
Setting up Selenium Grid
- Exploring Selenium Grid
- Understanding the hub
- Understanding the node
- Modifying the existing test script to use Selenium Grid
- Configuring Selenium Grid
- Using cloud-based grids for cross-browser testing
- Summary
- Questions
- Further information
-
The PageObject Pattern
- Creating test cases for our WordPress blog
- What is the PageObject pattern?
-
Good practices for the PageObjects design
- Think of a web page as a services provider
- Always look for implied services
- Using PageObjects within a PageObject
- Think of methods in PageObjects as services and not as user actions
- Identifying some WebElements on the fly
- Keeping the page-specific details off the test script
- Understanding loadable components
- Working on an end-to-end example of WordPress
- Summary
- Questions
- Further information
- Mobile Testing on iOS and Android using Appium
- Data-Driven Testing with TestNG
- Assessments
- Other Books You May Enjoy
Product information
- Title: Selenium WebDriver 3 Practical Guide - Second Edition
- Author(s):
- Release date: July 2018
- Publisher(s): Packt Publishing
- ISBN: 9781788999762
You might also like
book
Selenium WebDriver Quick Start Guide
Get writing tests and learn to design your own testing framework with Selenium WebDriver API Key …
video
Mastering Selenium WebDriver 3.X Test Automation
Are you facing an issue where your tests break often for no obvious reason or are …
book
Mastering Selenium WebDriver 3.0
Complement Selenium with useful additions that fit seamlessly into the rich and well-crafted API that Selenium …
book
Selenium Testing Tools Cookbook - Second Edition
Over 90 recipes to help you build and run automated tests for your web applications with …