{ "info": { "author": "Valentin Monte", "author_email": "valentin.monte@optiflows.com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Software Development :: Testing" ], "description": "# django-webdriver\n\nDjango app to run selenium tests with webdriver\n\n## Features\n\nExtends the feature of [django-nose](https://github.com/django-nose/django-nose) to manage the selenium tests.\n\n## Installation\n\nYou can get django-webdriver from PyPi:\n```bash\npip install django-webdriver\n```\n \nTo use it you should add it to your `INSTALLED_APPS` in `settings.py`. \nDjango-webdriver uses django-nose to run the tests, so you should also configure django-nose in your project:\n\n```python\nINSTALLED_APPS = (\n ... \n 'django_webdriver',\n 'django_nose',\n ...\n)\n \nTEST_RUNNER = 'django_nose.NoseTestSuiteRunner'\n```\n \n## Usage\n\nWith django-webdriver you may run just unit tests or just selenium tests or the both.\n\n### Launch tests\n\n* `--selenium-only`: only run selenium tests\n* `--with-selenium`: run all tests (unit and selenium)\n* ` `: will only run unit test.\n\n### Configure\n\n#### Local\n\nAdd `--webdriver=` to specify webdriver you want to use locally.\n\nIt can be one of these for example (be careful to case):\n* Firefox\n* PhantomJS\n* Chrome\n* ...\n* [More here](http://selenium-python.readthedocs.org/en/latest/api.html#webdriver-api)\n\n##### Example\n\n```bash\n./manage.py test --with-selenium --webdriver=PhantomJS\n```\n\n#### Remote\n\n* Add `--remote_selenium_provider=` to specify which remote grid you want to use.\n* Add configuration for each grid in your `settings.py`:\n```python\nDJANGO_WEBDRIVER_SETTINGS = {\n 'remote_providers': {\n 'grid': {\n 'url': 'http://192.168.0.18:4444/wd/hub',\n # will use 'default' capabilities\n },\n 'sauce-lab': {\n 'url': 'http://my_url',\n 'capabilities': 'ie',\n },\n },\n 'remote_capabilities': {\n 'default': [\n {\n 'browser': 'firefox',\n 'platform': 'WINDOWS'\n },\n ],\n 'ie': [\n {\n 'browser: 'internet explorer',\n 'version': 6,\n }\n ]\n }\n}\n```\n\n### Write selenium tests\n\nTo write selenium tests you have to name the files `tests_selenium.py`. You may also use a python module name `tests_selenium` but you have to define your test files in the `__init__.py`. \n\nYour selenium test classes have to inherit of `django_webdriver.base.DjangoWebdriverTestCase`.\nYou have not to manage the life cycle of the webdriver in the setUp or in the tearDown methods. The webdriver is instanciated before the setUp and it is stoped after the tearDown, so you may use it in these methods.\n\n```python\nfrom django_webdriver.base import DjangoWebdriverTestCase\n\nclass TestSelenium(DjangoWebdriverTestCase):\n\n def setUp(self):\n self.webdriver.get('http://wwww.github.com') #it's ok\n self.webdriver = '...' #it's forbiden because you break the life cycle.\n \n def tearDown(self):\n self.webdriver... #it's ok\n self.webdriver.quit() #it's forbiden because you break the life cycle too.\n \n def test_google(self):\n url = 'https://www.google.fr/'\n self.webdriver.get(url)\n self.assertEqual(url, self.webdriver.current_url)\n\n```", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/optiflows/django-webdriver", "keywords": null, "license": "Apache License 2.0", "maintainer": null, "maintainer_email": null, "name": "django-webdriver", "package_url": "https://pypi.org/project/django-webdriver/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-webdriver/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/optiflows/django-webdriver" }, "release_url": "https://pypi.org/project/django-webdriver/0.1.2/", "requires_dist": null, "requires_python": null, "summary": "Django app to run selenium webdriver tests.", "version": "0.1.2" }, "last_serial": 1743672, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "cb5b2c0d6d16a2fab886ee92c0798e22", "sha256": "d3e42669a2d5401b7d2e1c82d5596349c5c0b6d93a195bedcb9c19dd63e13fb1" }, "downloads": -1, "filename": "django-webdriver-0.1.tar.gz", "has_sig": false, "md5_digest": "cb5b2c0d6d16a2fab886ee92c0798e22", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9618, "upload_time": "2014-04-14T16:10:48", "url": "https://files.pythonhosted.org/packages/ce/40/5c07af6fe982c479f148bbc09e5f07e41b0f9b01016af67fe7090b776c03/django-webdriver-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "2b7d13442d34b65d709216858c2bde2e", "sha256": "af8b2d3cbb65b4bbe6ddd496b3361028e4959c9948dab3f1687aa22d884a7f94" }, "downloads": -1, "filename": "django-webdriver-0.1.1.tar.gz", "has_sig": false, "md5_digest": "2b7d13442d34b65d709216858c2bde2e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11536, "upload_time": "2014-04-15T08:28:41", "url": "https://files.pythonhosted.org/packages/9b/60/8e34dae1f0e27e72699204318d52b40c294b3720f5509c95e545a131324d/django-webdriver-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "6b0436c45bd640bd7d40da9a0d25679b", "sha256": "ddbecd298ac4412f76eb3e0f050073a65e9f016db29019537f1e2ec25e2edf68" }, "downloads": -1, "filename": "django-webdriver-0.1.2.tar.gz", "has_sig": false, "md5_digest": "6b0436c45bd640bd7d40da9a0d25679b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10848, "upload_time": "2014-04-15T12:07:27", "url": "https://files.pythonhosted.org/packages/21/51/18b6eb6d6af4cec800939bb15245f9597e5a9f19f2e8456f0e8f8034608e/django-webdriver-0.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "6b0436c45bd640bd7d40da9a0d25679b", "sha256": "ddbecd298ac4412f76eb3e0f050073a65e9f016db29019537f1e2ec25e2edf68" }, "downloads": -1, "filename": "django-webdriver-0.1.2.tar.gz", "has_sig": false, "md5_digest": "6b0436c45bd640bd7d40da9a0d25679b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10848, "upload_time": "2014-04-15T12:07:27", "url": "https://files.pythonhosted.org/packages/21/51/18b6eb6d6af4cec800939bb15245f9597e5a9f19f2e8456f0e8f8034608e/django-webdriver-0.1.2.tar.gz" } ] }