Skip to main content

Tools for using Selenium WebDriver with Python unit testing

Project description

PyPI GitHub

Utilities for writing front-end test suites using Selenium WebDriver and python unit tests.

Overview

This project aims to reduce the amount of time and additional code required to automate front-end functional testing by providing utilities and conventions for building test suites.

Features

  • Utilities and extended functionality for the Selenium WebDriver package

  • Pre-defined test methods for commonly used test procedures

  • Unit testing framework for automated tests on multiple browsers

  • Implementation of the Page Object Model and pre-defined page objects for common elements (navbars, forms, etc)

  • Command line tool for quickly generating files and directories for new test projects

  • Support for automating tests on BrowserStack

This project uses Selenium WebDriver for automated browser actions and the python unittest library for the test framework, documentation for which can be found below:

Creating a Test Suite

The package itself does not contain test cases. To generate files for a new test suite, change into the desired directory and run:

webdriver_test_tools --init

This will generate a new test package with template files and project directories.

For information on the test package structure and command line arguments, see the test project documentation.

For information on setting up a test project and writing tests using the webdriver_test_tools framework, see the example test project documentation.

Prerequisites

Python

  • python 3+

  • pip

Drivers

In order to use Selenium, drivers will need to be installed for any browser tests will be run on.

Cross-Platform

The following cross-platform browser drivers are supported and enabled by default:

These can be disabled in <test_package>/config/browser.py by commenting out the corresponding line in BrowserConfig.BROWSER_TEST_CLASSES.

Platform-Specific

The following platform-specific drivers are supported:

These need to be enabled in <test_package>/config/browser.py by uncommenting the corresponding line in BrowserConfig.BROWSER_TEST_CLASSES.

For information on usage and considerations, see the additional browsers documentation.

Installation

The package can be installed using pip:

pip install webdriver-test-tools

Note: Command may be pip3 instead of pip depending on the system.

Command Line Usage

For info on command line arguments:

webdriver_test_tools --help

To initialize a new test project in the current directory:

webdriver_test_tools --init

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

webdriver_test_tools-0.24.0.tar.gz (29.3 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page