web.web.browser.AppBrowser

Package web :: Package web :: Module browser :: Class AppBrowser |
[hide private]
[frames] | no frames]

# Class AppBrowser

source code

    Browser --+
              |
             AppBrowser

Browser interface to test web.py apps.

b = AppBrowser(app) b.open('/') b.follow_link(text='Login')

b.select_form(name='login') b['username'] = 'joe' b['password'] = 'secret' b.submit()

assert b.path == '/' assert 'Welcome joe' in b.get_text()

Instance Methods | [hide private]
__init__(self, app) | source code
build_opener(self) Builds the opener using urllib2.build_opener. | source code
Inherited from `Browser`: `__getitem__`, `__setitem__`, `do_request`, `find_link`, `follow_link`, `get_forms`, `get_links`, `get_response`, `get_soup`, `get_text`, `open`, `reset`, `select_form`, `show`, `submit` Inherited from `Browser` (private): `_filter_links`, `_get_links`

Method Details | [hide private]

### __init__(self, app) (Constructor) | source code
Overrides: Browser.__init__

### build_opener(self) | source code
Builds the opener using urllib2.build_opener. Subclasses can override this function to prodive custom openers. Overrides: Browser.build_opener (inherited documentation)