Changeset 3539


Ignore:
Timestamp:
1 Jul 2008, 02:36:51 (16 years ago)
Author:
uli
Message:

Fix browser tests.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • waeup/branches/uli-cleanup/src/waeup/browser.txt

    r3523 r3539  
    3434  >>> browser.open('http://localhost/myuniversity')
    3535  >>> print browser.contents
    36   <html>...
     36  <!DOCTYPE html ...
    3737  ...<h1>Congratulations!</h1>...
    3838  ...
     
    5151  True
    5252
    53 Faculties
    54 =========
    55 
    56 Wie can add faculties, by calling and submitting an add form of an
    57 university. The add form can be retrieved by calling the
    58 ``addfaculty`` view of an university::
    59 
    60   >>> browser.open('http://localhost/myuniversity/addfaculty')
    61   >>> print browser.contents
    62   <html>...
    63   ...<span class="required">*</span><span>Name of Faculty</span>
    64   ...
    65 
    66 We fill in a new name for our new faculty::
    67 
    68   >>> ctrl = browser.getControl(name='form.name')
    69   >>> ctrl.value = 'TestFac'
    70 
    71 Finally we click on 'Add Faculty' to add the new thing::
    72 
    73   >>> browser.getControl('Add Faculty').click()
    74   >>> #print browser.contents
    75 
    76 We can view a faculty by browsing a URL like this::
    77 
    78   >>> browser.open('http://localhost/myuniversity/TestFac')
    79 
    80 Afterwards, the faculty should be visible:
    81 
    82   >>> browser.open('http://localhost/myuniversity/')
    83   >>> print browser.contents
    84   <html...
    85   ...<h2>Your faculties:</h2>
    86   ...<a href="http://localhost/myuniversity/TestFac">TestFac</a>
    87   ...
    88 
    89 
    90 
Note: See TracChangeset for help on using the changeset viewer.