Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering Selenium WebDriver 3.0

You're reading from   Mastering Selenium WebDriver 3.0 Boost the performance and reliability of your automated checks by mastering Selenium WebDriver

Arrow left icon
Product type Paperback
Published in Jun 2018
Publisher Packt
ISBN-13 9781788299671
Length 376 pages
Edition 2nd Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Mark Collin Mark Collin
Author Profile Icon Mark Collin
Mark Collin
Arrow right icon
View More author details
Toc

Table of Contents (15) Chapters Close

Preface 1. Creating a Fast Feedback Loop 2. Producing the Right Feedback When Failing FREE CHAPTER 3. Exceptions Are Actually Oracles 4. The Waiting Game 5. Working with Effective Page Objects 6. Utilizing the Advanced User Interactions API 7. JavaScript Execution with Selenium 8. Keeping It Real 9. Hooking Docker into Selenium 10. Selenium – the Future 11. Other Books You May Enjoy Appendix A: Contributing to Selenium 1. Appendix B: Working with JUnit 2. Appendix C: Introduction to Appium

What this book covers

Chapter 1, Creating a Fast Feedback Loop, explains how to build a basic test framework that enables you to get started quickly. You will then focus on setting up a project using Maven to download your dependencies. Then you will learn about the advantages of running tests in parallel with multiple instances of the same browser in TestNG. Next, you will learn how to make your test code portable by automatically downloading the driver binaries using a Maven plugin and run your tests without interruption by running them in headless mode.

Chapter 2, Producing the Right Feedback When Failing, explores how to cope when tests start failing. This chapter gives you a good understanding of why reliability matters and how to configure your tests to run in a Maven profile. You will get an understanding of continuous integration, continuous delivery, and continuous deployment, and set up a test build in a continuous integration server. You also learn how to connect to Selenium-Grid, how to take screenshots of test failures, and investigate the causes of test failures by reading the stack trace.  

Chapter 3, Exceptions Are Actually Oracles, provides a great deal of insight into what has gone wrong with your automated checks. You will explore the various exceptions generated by Selenium and understand what they mean. Further, you will gain a good understanding of how WebElement is a reference to an element in the DOM, understand the basic architecture of Selenium, and learn how it sends commands to the browser. 

Chapter 4, The Waiting Game, explains the most common causes of test failures in automation and also various wait solutions in Selenium. You will explore how waits work in Selenium and how you should use them to ensure that you have stable and reliable tests.

Chapter 5, Working with Effective Page Objects, discusses page objects and explains how to use them effectively without letting them get out of control. It also teaches you how to use your page objects to reduce duplication, which in turn will help you make your code concise and your automated checks more readable. Then we will finish off the chapter by understanding how to build fluent page objects.  

Chapter 6, Utilizing the Advanced User Interactions API, explains how to use the Advanced User Interactions API. You will learn how you can automate challenging scenarios such as hover menus and drag-and-drop controls. You will also explore some of the problems that you may come across when using the Advanced User Interactions API. 

Chapter 7, JavaScript Execution with Selenium, helps you understand how to use the JavascriptExecutor class. This chapter explores how you can use it to work around complex automation problems. You also learn how to execute asynchronous scripts that use a callback to notify Selenium that they have completed the execution.

Chapter 8, Keeping It Real, shows you the limitations of Selenium. You then explore various scenarios that demonstrate how to extend Selenium to work with external libraries and applications so that you will be able to use the right tool for the job.

Chapter 9, Hooking Docker into Selenium, looks at how you can use Docker with Selenium. You will understand how easy it is to start spinning up your own grid in Docker. You will also look at how you can integrate Docker into your build process.

Chapter 10, Selenium - the Future, has a look at machine learning and artificial intelligence.  You will then learn how to leverage some of that technology with Applitools EYES.

Appendix A, Contributing to Selenium, explores ways in which you can help the Selenium project.

Appendix B, Working with JUnit, explores the changes required to switch from TestNG to JUnit.

Appendix C, Introduction to Appium, explains how to create a basic Appium test framework. 

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime