Mastering Selenium WebDriver

Increase the performance, capability, and reliability of your automated checks by mastering Selenium WebDriver
Preview in Mapt

Mastering Selenium WebDriver

Mark Collin

1 customer reviews
Increase the performance, capability, and reliability of your automated checks by mastering Selenium WebDriver
Mapt Subscription
FREE
$29.99/m after trial
eBook
$25.20
RRP $35.99
Save 29%
Print + eBook
$44.99
RRP $44.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$25.20
$44.99
$29.99 p/m after trial
RRP $35.99
RRP $44.99
Subscription
eBook
Print + eBook
Start 30 Day Trial

Frequently bought together


Mastering Selenium WebDriver Book Cover
Mastering Selenium WebDriver
$ 35.99
$ 25.20
Mastering Machine Learning Algorithms Book Cover
Mastering Machine Learning Algorithms
$ 35.99
$ 25.20
Buy 2 for $35.00
Save $36.98
Add to Cart

Book Details

ISBN 139781784394356
Paperback280 pages

Book Description

Selenium WebDriver, also known as Selenium 2, is a UI automation tool used by software developers and QA engineers to test their web applications on different web browsers. The Selenium WebDriver API is fully object oriented compared with the deprecated Selenium RC. The WebDriver API provides multi-language support and run tests on all the most popular browsers.

In this wide and complex World Wide Web era, this book will teach you how to tame it by gaining an in-depth understanding of the Selenium API.

This book starts with how to solve the difficult problems that you will undoubtedly come across as you start using Selenium in an enterprise environment, followed by producing the right feedback when failing, and what the common exceptions are, explain them properly (including the root cause) and tell you how to fix them. You will also see the differences between the three available implicit waits and explicit waits, and learn to working with effective page objects.

Moving on, the book shows you how to utilize the Advanced User Interactions API, how you can run any JavaScript you need through Selenium, and how to quickly spin up a Selenium Grid using Docker containers.

At the end, the book will discuss the upcoming Selenium W3C specification and how it is going to affect the future of Selenium.

Table of Contents

Chapter 1: Creating a Fast Feedback Loop
Making it easy for developers to run tests
Building our test project with Apache Maven
Running your tests in parallel
Parallel tests with TestNG
There are no silver bullets
Multiple browser support
Downloading the WebDriver binaries automatically
Going headless
Summary
Chapter 2: Producing the Right Feedback When Failing
Location, location, location
Tests are living documentation
Reliability
Baking in reliability
Continuous integration is the key
Extending our capabilities by using a Selenium Grid
A picture paints a thousand words
Don't be afraid of the big bad stack trace
Summary
Chapter 3: Exceptions Are Actually Oracles
Are exceptions oracles?
NoSuchElementException
NoSuchFrameException
NoSuchWindowException
ElementNotVisibleException
StaleElementReferenceException
InvalidElementStateException
UnsupportedCommandException
UnreachableBrowserException
SessionNotFoundException
Summary
Chapter 4: The Waiting Game
Are we nearly ready yet?
I've timed it and I know it takes 5 seconds for the page to load
So, what do we do?
I just want Selenium to do it for me
Using explicit waits
FluentWaits – the core of explicit waits
Summary
Chapter 5: Working with Effective Page Objects
Why do you keep repeating yourself?
Starting out with page objects
Using page objects to ensure good separation of concerns
Introducing the Java PageFactory class
Creating extensible page objects
Turning your page objects into a readable domain-specific language
Fluent page objects
Summary
Chapter 6: Utilizing the Advanced User Interactions API
Getting started with the API
Using the API to solve difficult problems
Summary
Chapter 7: JavaScript Execution with Selenium
Introducing the JavaScript executor
Let's not get carried away
So, what should we do with it?
I want to see a more complex example!
Can I use JavaScript libraries?
Should I inject JavaScript libraries?
What about asynchronous scripts?
Summary
Chapter 8: Keeping It Real
Downloading files with Selenium
You cannot track the network traffic with Selenium
But I really want to track my network traffic!
Writing performance tests with Selenium
Penetration testing with Selenium
Summary
Chapter 9: Hooking Docker into Selenium
Introducing Docker
Installing Docker
Spinning up a Selenium Grid with Docker
Running tests against our new Selenium Grid
Starting up Docker containers as part of the build
Using a Docker Maven plugin
The future with Docker
Summary
Chapter 10: Selenium – the Future
Selenium – the future of browser and device testing
If Selenium is the future, how can I help?
Making changes to Selenium
Summary

What You Will Learn

  • Provide fast, useful feedback with sensible errors and screenshots
  • Create extensible, well-composed page objects
  • Gain an in-depth understanding of implicit and explicit waits, and how you should use them
  • Leverage the full power of the Actions API
  • Explore the full potential of the JavascriptExecutor
  • Extend Selenium’s capabilities by integrating other applications
  • Learn how to plug third-party products into Selenium, and where it is appropriate to do so

Authors

Table of Contents

Chapter 1: Creating a Fast Feedback Loop
Making it easy for developers to run tests
Building our test project with Apache Maven
Running your tests in parallel
Parallel tests with TestNG
There are no silver bullets
Multiple browser support
Downloading the WebDriver binaries automatically
Going headless
Summary
Chapter 2: Producing the Right Feedback When Failing
Location, location, location
Tests are living documentation
Reliability
Baking in reliability
Continuous integration is the key
Extending our capabilities by using a Selenium Grid
A picture paints a thousand words
Don't be afraid of the big bad stack trace
Summary
Chapter 3: Exceptions Are Actually Oracles
Are exceptions oracles?
NoSuchElementException
NoSuchFrameException
NoSuchWindowException
ElementNotVisibleException
StaleElementReferenceException
InvalidElementStateException
UnsupportedCommandException
UnreachableBrowserException
SessionNotFoundException
Summary
Chapter 4: The Waiting Game
Are we nearly ready yet?
I've timed it and I know it takes 5 seconds for the page to load
So, what do we do?
I just want Selenium to do it for me
Using explicit waits
FluentWaits – the core of explicit waits
Summary
Chapter 5: Working with Effective Page Objects
Why do you keep repeating yourself?
Starting out with page objects
Using page objects to ensure good separation of concerns
Introducing the Java PageFactory class
Creating extensible page objects
Turning your page objects into a readable domain-specific language
Fluent page objects
Summary
Chapter 6: Utilizing the Advanced User Interactions API
Getting started with the API
Using the API to solve difficult problems
Summary
Chapter 7: JavaScript Execution with Selenium
Introducing the JavaScript executor
Let's not get carried away
So, what should we do with it?
I want to see a more complex example!
Can I use JavaScript libraries?
Should I inject JavaScript libraries?
What about asynchronous scripts?
Summary
Chapter 8: Keeping It Real
Downloading files with Selenium
You cannot track the network traffic with Selenium
But I really want to track my network traffic!
Writing performance tests with Selenium
Penetration testing with Selenium
Summary
Chapter 9: Hooking Docker into Selenium
Introducing Docker
Installing Docker
Spinning up a Selenium Grid with Docker
Running tests against our new Selenium Grid
Starting up Docker containers as part of the build
Using a Docker Maven plugin
The future with Docker
Summary
Chapter 10: Selenium – the Future
Selenium – the future of browser and device testing
If Selenium is the future, how can I help?
Making changes to Selenium
Summary

Book Details

ISBN 139781784394356
Paperback280 pages
Read More
From 1 reviews

Read More Reviews

Recommended for You

Learning Selenium Testing Tools - Third Edition Book Cover
Learning Selenium Testing Tools - Third Edition
$ 26.99
$ 18.90
Cucumber Cookbook Book Cover
Cucumber Cookbook
$ 31.99
$ 22.40
Selenium Testing Tools Cookbook Book Cover
Selenium Testing Tools Cookbook
$ 26.99
$ 18.90
Learning Continuous Integration with Jenkins Book Cover
Learning Continuous Integration with Jenkins
$ 47.99
$ 33.60
Performance Testing with JMeter - Second Edition Book Cover
Performance Testing with JMeter - Second Edition
$ 31.99
$ 22.40
Web Services Testing with soapUI Book Cover
Web Services Testing with soapUI
$ 29.99
$ 21.00