Skip to main content

Helpers for writing selenium tests for Django

Project description

selenosis noun sel·e·no·sis /sɛliːˈnəʊsɪs/. poisoning due to excessive intake of selenium.

django-selenosis (formerly django-admin-testutils) contains helpers to make writing selenium unit tests for Django, and in particular the Django admin, easier. It is based on the code that supported selenium unit tests in django-nested-admin.

The test runner is designed to work similarly to the Django framework’s own The best guide on usage can be found in the unit tests for this repository. Specifically, look at and selenosis/tests/

Development and Testing

Install chromedriver

You can use homebrew or manually download chomedriver:

  1. homebrew:

    brew install --cask chromedriver
  2. Manually:

    export PATH="$PWD:$PATH"
    export CHROMEDRIVER_VERSION=$(curl -q
    chmod +x chromedriver

Run tox To Test

Run all tests:

tox -- --selenium=chrome-headless

Run only a specified test environment:

tox -e py37-dj22 -- --selenium=chrome-headless

If you would like to observe the browser during a test run, simply remove -headless in the above examples.

Download files

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

Source Distribution

django-selenosis-2.0.0.tar.gz (13.5 kB view hashes)

Uploaded source

Built Distribution

django_selenosis-2.0.0-py3-none-any.whl (17.5 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page