Metadata-Version: 1.1
Name: ghostly
Version: 0.2.0
Summary: Lightweight API around Selenium Webdriver for end to end testing with Django.
Home-page: http://github.com/alexhayes/ghostly
Author: Alex Hayes
Author-email: alex@commoncode.com
License: MIT
Description: =======
        Ghostly
        =======
        
        Lightweight API around Selenium Webdriver and helpers for end to end testing
        with Django.
        
        This package is alpha, the API will most likely change!
        
        Usage
        =====
        
        You can use use this package outside of Django however it has limited use.
        
        Essentially there are two components, as follows;
        
        - ``Ghostly`` - A lightweight wrapper and helper methods for Selenium
          Webdriver. Presently it provides a handful of methods that utilise xpath to
          deal with a page, such as ``xpath``, ``xpath_wait`` et al.
        - ``GhostlyDjangoTestCase`` - A lightweight test case that extends
          `StaticLiveServerTestCase`_ and sets up an instance of ``Ghostly``. It
          provides methods such as ``assertCurrentUrl``, ``assertXpathEqual`` et al.
        
        GhostlyDjangoTestCase
        ---------------------
        
        ``GhostlyDjangoTestCase`` inherits `StaticLiveServerTestCase`_ and thus fires up
        a WSGI server that handles requests.
        
        Given you have a named URL ``home`` with a ``<h1>Hello World</h1>`` visible in
        the source, you can do the following;
        
        .. code-block:: python
        
            class MyTestCase(GhostlyDjangoTestCase):
        
                def test_homepage(self):
                    self.goto(reverse('home'))
        
                    # Assert that an element is equal to something
                    self.assertXpathEqual('//h1', 'Hello World')
        
                    # Assert the current url, relative or absolute
                    self.assertCurrentUrl('/home')
        
        
        Working with SVG
        ----------------
        
        To traverse SVG with Selenium web driver you must use xpath.
        
        .. code-block:: python
        
            class MyTestCase(GhostlyDjangoTestCase):
        
                def test_homepage(self):
                    self.goto(reverse('home'))
        
                    # Click on an element, or example, in an SVG.
                    self.ghostly.xpath_click('//*[@id="refresh"]')
        
                    # Assert that an Xpath is equal to something
                    self.assertXpathEqual('//h2', 'Hello World')
        
        
        History
        =======
        
        This package started out as a simple way to construct browser tests using YAML,
        written by Brenton Cleeland.
        
        The focus of this fork is to allow the developer to write programmatic unit
        tests in the style of `unittest`_.
        
        Currently this fork does not contain any of the CSS selector style methods that
        were originally available as the focus has been on xpath only support until a
        more robust CSS selector toolkit can be provided.
        
        
        License
        =======
        
        This software is licensed under the `MIT License`. See the ``LICENSE``
        file in the top distribution directory for the full license text.
        
        
        Author
        ======
        
        - Alex Hayes <alex@commoncode.com>
        - Brenton Cleeland <brenton@commoncode.com>
        
        .. _StaticLiveServerTestCase: https://docs.djangoproject.com/en/1.8/ref/contrib/staticfiles/#django.contrib.staticfiles.testing.StaticLiveServerTestCase
        .. _unittest: https://docs.python.org/2/library/unittest.html
        
Platform: any
Classifier: Development Status :: 4 - Beta
Classifier: Framework :: Django
Classifier: Framework :: Django :: 1.7
Classifier: Framework :: Django :: 1.8
Classifier: License :: OSI Approved :: MIT License
Classifier: Topic :: System :: Distributed Computing
Classifier: Topic :: Software Development :: Object Brokering
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Operating System :: OS Independent
Classifier: Operating System :: POSIX
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: MacOS :: MacOS X
