Chapter 2. Writing Tests Using unittest

Selenium WebDriver is a browser automation API. It provides features to automate browser interaction, and this API is mainly used to test web applications. We cannot set up test preconditions and post conditions, check the expected and actual output, check the state of the application, report test results, create data-driven tests, and so on with Selenium WebDriver. We can use a unit testing framework or test runners used for unit testing along with Selenium to create a testing framework. In this chapter, we will learn how to use the unittest library to create Selenium WebDriver tests in Python.

In this chapter, we will cover the following topics:

  • What unittest is?
  • Using the unittest library to write Selenium ...

Get Learning Selenium Testing Tools with Python 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.