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) ...
Get Hands-On Selenium WebDriver with Java now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.