Book Image

Selenium Fundamentals

By : Diego Molina
Book Image

Selenium Fundamentals

By: Diego Molina

Overview of this book

<p>There are several challenges while writing automated tests for web applications: you have to select an adequate test framework, use appropriate selectors to avoid flaky tests, and build a good testing framework. Selenium Fundamentals helps you tackle these challenges and provides you with the knowledge to overcome hurdles in testing by developing stable and effective testing solutions. You’ll learn the complete process of automated testing, such as configuring your environment, creating and running automated tests, analyzing reports, and troubleshooting errors by using a Selenium Grid. </p><p> </p><p>To start with, you’ll understand the importance of automating tests. You’ll then move on to understanding how to choose the best selectors for navigating through your web applications while highlighting best practices and techniques. </p><p> </p><p>After writing your first tests, you’ll cover the object model to create your own advanced test cases. You’ll analyze a test report, track timing errors, and separate real issues from flaky tests. In addition to this, you’ll learn how to configure and connect to a local grid, a network grid, and a third-party service. </p><p> </p><p>By the end of the book, you will have the skills you need to run automated tests on your own web applications.</p>
Table of Contents (12 chapters)

Navigating the DOM

Having a correct and reliable element is one of the most important aspects of the process of automating a web application. Elements allow us to interact with a web application just like a real user would; that is why it is important to understand how
to locate elements and how to choose good locators.

Understanding the DOM's Structure

A very relevant question you may ask would be if DOM and HTML are the same. This is meant to be a very tricky question, because visually, they look similar. HTML is the code used to build the page; when the browser takes the HTML and renders it, it becomes the DOM.

Two differences between the DOM and the HTML are as follows. If the HTML has an error (for example, if you...