Contributing

The Source Code is hosted on GitHub

For small fixes, opening a new Pull Request in the project’s repo is fine.

For larger issues or new features, please open an issue first.

If you want to add a new driver, check out our docs for creating new splinter drivers.

Before opening a new Pull Request, please ensure the linter and at least platform agnostic tests are passing on your branch.

Requirements

Tests should be run using tox

Install tox from the command line:

pip install tox

Linter

Splinter enforces code standards using various linting tools. They can be run from tox:

tox -e lint

Tests

Run

The tests are split into two groups: Platform agnostic and Windows-only.

To run the platform agnostic tests:

tox -e tests -- tests/
tox -e tests_selenium4 -- tests/

To run the windows tests:

tox -e tests_windows -- tests/
tox -e tests_windows_selenium4 -- tests/

You can also specify one or more test files to run:

$ tox -e tests_windows_selenium4 -- tests/test_webdriver_firefox.py, tests/test_request_handler.py

Documentation

Write

Documentation is written using Sphinx, which uses RST.

We use the Read the Docs Sphinx Theme.

Build

In order to build the HTML docs, navigate to the project folder (the main folder, not the docs folder) and run the following command:

$ make doc

The requirements for building the docs are specified in requirements/docs.txt in the project folder.