Changeset 6597 for main


Ignore:
Timestamp:
12 Aug 2011, 13:23:30 (13 years ago)
Author:
Henrik Bettermann
Message:

Further improve test coverage.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/browser/browser.txt

    r6346 r6597  
    5858  True 
    5959
     60We can perform several actions on the edit form::
     61
     62  >>> browser.getControl("Save", index=0).click()
     63  >>> print browser.contents
     64  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
     65  ...<li class="message">Settings have been saved.</li>
     66  ...
     67
     68  >>> browser.getControl("Cancel").click()
     69  >>> print browser.contents
     70  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
     71  ...<li class="message">Action cancelled.</li>
     72  ...
     73
     74  >>> browser.open('http://localhost/myuniversity/manage')
     75  >>> browser.getControl("Save and return").click()
     76  >>> print browser.contents
     77  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
     78  ...<li class="message">Settings have been saved.</li>
     79  ...
     80
     81  >>> browser.open('http://localhost/myuniversity/manage')
     82  >>> browser.getControl("Update plugins").click()
     83  >>> print browser.contents
     84  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
     85  ...<li class="message">Plugins were updated. See log file for details.</li>
     86  ...
     87
     88
    6089We can export a university as XML::
    6190
     
    72101  Content-Type: text/xml; charset=UTF-8
    73102  X-Powered-By: Zope (www.zope.org), Python (www.python.org)
     103
     104
     105Portal Users
     106============
     107
     108  >>> browser.open('http://localhost/myuniversity')
     109  >>> browser.getLink('Portal Users').click()
     110  >>> print browser.contents
     111  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
     112  ...manage portal users...
     113  ...
     114
     115We can add users:
     116
     117  >>> browser.getLink("Add user").click()
     118  >>> browser.getControl(name="form.name").value = 'bob'
     119  >>> browser.getControl(name="form.password").value = 'secret'
     120  >>> browser.getControl("Add user").click()
     121  >>> print browser.contents
     122  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
     123  ...<td>bob</td>
     124  ...
     125
     126We can edit user bob:
     127
     128  >>> browser.getControl("edit", index=0).click()
     129  >>> browser.getControl("Save", index=0).click()
     130  >>> browser.getControl("Save and return", index=0).click()
     131  >>> browser.getControl("edit", index=0).click()
     132  >>> browser.getControl("Cancel", index=0).click()
     133
    74134
    75135Contact Form
     
    896956  >>> import shutil
    897957  >>> shutil.rmtree(uploadpath)
     958
Note: See TracChangeset for help on using the changeset viewer.