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:
unittestlibrary to write Selenium ...