O'Reilly logo

Learning Selenium Testing Tools with Python by Unmesh Gundecha

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required