{ "info": { "author": "Charlie DeTar", "author_email": "cfd@media.mit.edu", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content" ], "description": "Django Selenium Boilerplate\n===========================\n\nA simple boilerplate app for selenium testing in Django with ``LiveServerTestCase``.\n\nInstallation::\n\n pip install django-selenium-boilerplate\n\nUsage\n------\n\nThis app provides a ``SeleniumBase`` class that extends ``LiveServerTestCase``. It sets up selenium, and provides several helper methods for testing.\n\n- ``SeleniumBase.url(route, *args, **kwargs)``: Returns the full live server URL to the given route. If ``rotue`` starts with \"/\", it's interpreted as a full path. Otherwise, it's interpreted as a reversible route name, which is resolved using ``reverse(route, args=args, kwargs=kwargs)``.\n- ``SeleniumBase.by_css(selector)``: Shortcut for ``self.selenium.find_element_by_css_selector``.\n- ``SeleniumBase.by_csss(selector)``: Shortcut for ``self.selenium.find_elements_by_css_selector``.\n- ``SeleniumBase.await_selector(selector, timeout=30)``: Polls for the presence of the given CSS selector, until the timeout. Returns when at least one element matching that selector is found.\n- ``SeleniumBase.select_option(selector, visible_text)``: Shortcut for selecting the ``