A front-end testing framework using Selenium WebDriver and Python.
WebDriver Test Tools provides a framework and utilities for writing front-end functional tests.
- Framework for writing cross-browser front-end test suites
- Pre-defined test functions for commonly used test procedures
- Utilities and extended functionality for the Selenium WebDriver package
- Implementation of the Page Object Model with pre-defined page objects for common elements (navbars, forms, etc)
- Command line tool for quickly generating files and directories for new test projects
- Mobile device layout emulation for responsive tests
- Headless browser testing
- Support for running 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:
In order to use Selenium, drivers will need to be installed for any browser tests will be run on. Below are currently supported drivers, their default enabled/disabled status, and their supported features:
|Driver||Enabled by Default||Headless Browsing||Mobile Layout|
Cross-platform browsers are enabled by default, while platform-specific browsers
are disabled by default. You can enable or disable drivers in
<test_package>/config/browser.py by setting the corresponding value in
The following documentation goes into detail on configuring browsers for testing:
The package can be installed using pip:
pip install webdriver-test-tools
Note: Command may be
pip3 instead of
pip depending on the system.
The package itself does not contain test cases. To generate files for a new test suite, change into the desired directory and run:
This will generate a new test package with template files and project directories.
The following documentation goes into detail on test projects:
To initialize a new test project in the current directory:
wtt init [<package_name>] [<"Project Title">] [--no-gitignore] [--no-readme]
<package_name>: Name for the new test package. (alphanumeric characters and underscores only. Cannot start with a number)
<"Project Title">: (Optional) Friendly name for the test project. Defaults to the value of <package_name> if not provided
--no-gitignore: Do not create .gitignore files for project root and log directory
--no-readme: Do not generate README file with usage info
If no arguments are provided, a prompt will walk you through project initialization.
For info on command line arguments:
To print the version number:
webdriver_test_tools can be used interchangeably.