Skip to Main Content
Hands-On Selenium WebDriver with Java
book

Hands-On Selenium WebDriver with Java

by Boni Garcia
March 2022
Intermediate to advanced content levelIntermediate to advanced
419 pages
9h 59m
English
O'Reilly Media, Inc.
Book available
Content preview from Hands-On Selenium WebDriver with Java

Chapter 2. Preparing for Testing

This chapter aims to implement your first end-to-end test using Selenium WebDriver and the Java language. To do that, we first review the technical requirements in terms of previous knowledge, hardware, and software. Second, this chapter provides an overview for setting up a Java project that includes Selenium WebDriver tests. You can use a build tool like Maven or Gradle to ease the project setup. Finally, you will learn to implement a basic end-to-end test with Selenium WebDriver, i.e., a hello world test. We will implement this test in several flavors, using different web browsers (such as Chrome, Edge, or Firefox) and unit testing frameworks (JUnit and TestNG). Remember that every code example in this book is available in an open source GitHub repository. Thus, you can reuse the content and configuration of this repository as the foundation for your own tests.

Requirements

The first requirement to start using Selenium WebDriver with Java is comprehending the Java language and object-oriented programming. It is not necessary to be an expert, but basic knowledge about it is required. Then, you can use Selenium WebDriver in any mainstream operating system: Windows, Linux, or macOS. Therefore, you can select the computer type you prefer. In principle, there are no specific requirements about its hardware in terms of memory, CPU, hard disk, etc., so any mid-tier computer will do.

Java Virtual Machine

Next, you need a Java Virtual Machine (JVM) ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Selenium WebDriver with Java - Basics to Advanced and Frameworks

Selenium WebDriver with Java - Basics to Advanced and Frameworks

Rahul Shetty

Publisher Resources

ISBN: 9781098109998Errata PageSupplemental Content