Skip to main content

Django app to run selenium webdriver tests.

Project description

django-webdriver
================

Django app to run selenium tests with webdriver

Features
--------

Extends the feature of
`django-nose <https://github.com/django-nose/django-nose>`__ to manage
the selenium tests.

Installation
------------

You can get django-webdriver from PyPi:
``bash pip install django-webdriver``

| To use it you should add it to your ``INSTALLED_APPS`` in
``settings.py``.
| Django-webdriver uses django-nose to run the tests, so you should also
configure django-nose in your project:

.. code:: python

INSTALLED_APPS = (
...
'django_webdriver',
'django_nose',
...
)

TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'

Usage
-----

With django-webdriver you may run just unit tests or just selenium tests
or the both.

Launch tests
~~~~~~~~~~~~

- ``--selenium-only``: only run selenium tests
- ``--with-selenium``: run all tests (unit and selenium)
- \` \`: will only run unit test.

Configure
~~~~~~~~~

Local
^^^^^

Add ``--webdriver=`` to specify webdriver you want to use locally.

It can be one of these for example (be careful to case): \* Firefox \*
PhantomJS \* Chrome \* ... \* `More
here <http://selenium-python.readthedocs.org/en/latest/api.html#webdriver-api>`__

Example
'''''''

.. code:: bash

./manage.py test --with-selenium --webdriver=PhantomJS

Remote
^^^^^^

- Add ``--remote_selenium_provider=`` to specify which remote grid you
want to use.
- Add configuration for each grid in your ``settings.py``:
``python DJANGO_WEBDRIVER_SETTINGS = { 'remote_providers': { 'grid': { 'url': 'http://192.168.0.18:4444/wd/hub', # will use 'default' capabilities }, 'sauce-lab': { 'url': 'http://my_url', 'capabilities': 'ie', }, }, 'remote_capabilities': { 'default': [ { 'browser': 'firefox', 'platform': 'WINDOWS' }, ], 'ie': [ { 'browser: 'internet explorer', 'version': 6, } ] } }``

Project details


Download files

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

Source Distribution

django-webdriver-0.1.1.tar.gz (11.5 kB view details)

Uploaded Source

File details

Details for the file django-webdriver-0.1.1.tar.gz.

File metadata

File hashes

Hashes for django-webdriver-0.1.1.tar.gz
Algorithm Hash digest
SHA256 af8b2d3cbb65b4bbe6ddd496b3361028e4959c9948dab3f1687aa22d884a7f94
MD5 2b7d13442d34b65d709216858c2bde2e
BLAKE2b-256 9b608e34dae1f0e27e72699204318d52b40c294b3720f5509c95e545a131324d

See more details on using hashes here.

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