Automating Web Testing with Selenium and Python

Video description

Developing reliable and accurate web testing automation with Selenium WebDriver and Python

About This Video

  • Get to grips with Selenium to automate your cumbersome testing phase
  • Create reliable and stable automation tests
  • Automate your tests to ensure that you get a higher ROI on the initially huge investments done by testing manually

In Detail

Selenium WebDriver is one of the most sought-after skills on this planet, and you can learn it today. One of the worst drags in the application development process is the testing phase. And the pressure to launch an application as early as possible may force you to cut corners in the time-consuming manual testing phase, resulting in half-baked products and end-users impeded by many glitches

If you're drowning in a never-ending collection of regression test cases and need to automate them, you're in the right place. This course will make your life as a developer easier and using Selenium will change the mundane way in which you run the exact same tests day in and day out.

Test automation with Selenium and Python, or developing scripts for running automated test commands against a range of browsers, will be more cost-effective, accurate, and faster than manual testing. The lack of manual intervention will diminish the possibility of errors and you will be able to find bugs at an early stage, making the process more reliable. By automating your web testing, you will be able to run tests on multiple devices simultaneously, which is impossible with manual testing.

By the end of this course, you will be well on the way to becoming a test automation specialist. Automating your testing with Python and Selenium will offer a highly efficient way to generate test scripts, validate their functionality, and reuse such scripts in an automated framework.

All the code and supporting files for this course are available on GitHub at

Downloading the example code for this course: You can download the example code files for all Packt video courses you have purchased from your account at If you purchased this course elsewhere, you can visit and register to have the files e-mailed directly to you.

Table of contents

  1. Chapter 1 : Setting Up Your Environment
    1. The Course Overview 00:02:38
    2. Selenium as a Testing Tool 00:02:11
    3. Web Page Structure, DOM, and Finding Elements 00:03:26
    4. Setting Up a Python 3 Test Environment and Visual Studio Code IDE 00:06:10
    5. Installing ChromeDriver and Creating and Running Selenium Tests 00:10:17
    6. Troubleshooting a Failed Test and Examining Results 00:07:41
  2. Chapter 2 : Caching DOM Elements
    1. Selecting Locators in the DOM 00:03:54
    2. Handcrafting CSS and XPath Locators 00:05:42
    3. Automating Buttons, Checkboxes, and Input Text Areas 00:04:16
    4. Automating Drop-Down Menus and Lists 00:04:31
    5. Automating Radio Buttons and Radio Groups 00:03:26
    6. Automating Tables 00:03:50
    7. Assertions 00:02:14
    8. Implicit and Explicit Wait 00:04:36
  3. Chapter 3 : Automating Browser Related Actions
    1. Executing JavaScript Code 00:03:50
    2. Capturing Screenshots 00:03:17
    3. Browser Window and Navigation 00:04:44
    4. Handling Cookies 00:04:08
    5. WebDriver Events 00:04:19
  4. Chapter 4 : Implementing the Page Object Model Design Pattern
    1. POM Design Pattern 00:02:06
    2. Test Example Without Using POM 00:13:55
    3. Modeling a Web Page Testing with POM 00:02:54
    4. Refactoring Test Code to Use POM 00:15:02
  5. Chapter 5 : Other Design Patterns and Principles
    1. Implementing SOLID Principles 00:04:35
    2. KISS, DRY, YAGNI, and Other Principles 00:03:00
    3. Working with Generic Software Design Patterns 00:08:19
  6. Chapter 6 : Execution Scaling
    1. Working with the Python unittest Module 00:12:33
    2. Making Test Runs in Parallel 00:04:24
    3. Selenium Grid 00:06:39
    4. Setting Up a Selenium Grid with Docker Containers 00:04:31
  7. Chapter 7 : Cross-Browser Testing
    1. Configuring WebDriver for Headless Browsers 00:04:05
    2. Running Tests in All Browsers 00:11:27
    3. Managing the Test Results 00:05:04
    4. Creating a Test Report 00:03:18
  8. Chapter 8 : Creating a Test Suite
    1. Suite Preparation 00:09:00
    2. Login Page Test Cases 00:08:47
    3. Submitting the Form Test Cases 00:08:43
    4. Data Scraping Example 00:06:22
    5. Putting It All Together 00:07:07

Product information

  • Title: Automating Web Testing with Selenium and Python
  • Author(s): Marko Stanojlovic
  • Release date: December 2018
  • Publisher(s): Packt Publishing
  • ISBN: 9781789614473