Changeset 4382 for waeup/branches
- Timestamp:
- 27 Jun 2009, 16:19:18 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
waeup/branches/ulif-rewrite/src/waeup/browser.txt
r4374 r4382 108 108 ... 109 109 110 110 111 Departments 111 112 =========== 113 114 Adding departments 115 ------------------ 112 116 113 117 Departments are stored in :class:`IFaculty` instances with their code … … 146 150 ...<a href="http://localhost/myuniversity/faculties/TF/TD">TestDept</a> 147 151 ... 152 153 154 Modifying departments 155 --------------------- 156 157 We can change the settings for a department by clicking on the 158 provided 'settings' link: 159 160 >>> browser.open('http://localhost/myuniversity/faculties/TF/TD') 161 >>> browser.getLink('Settings').click() 162 163 Let's set a new title and save the form: 164 165 >>> browser.getControl(name='form.title').value = "My test dept" 166 >>> browser.getControl(name='form.actions.save').click() 167 168 Clicking 'Save' we will stay on the settings form. So we can change 169 the department again. This time we will return to the overview page 170 afterwards: 171 172 >>> browser.getControl(name='form.title').value = "My renamed dept" 173 >>> ctrl = browser.getControl("Save and return") 174 >>> ctrl.click() 175 176 If we go to the settings page and click ``Cancel`` nothing will be 177 changed: 178 179 >>> browser.getLink('Settings').click() 180 >>> browser.getControl(name='form.title').value = "Blah" 181 >>> browser.getControl('Cancel').click() 182 183 Our department was indeed renamed to ``My renamed dept`` and not to 184 ``Blah``: 185 186 >>> browser.open('http://localhost/myuniversity/faculties/TF') 187 >>> print browser.contents 188 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"... 189 ...<h2>Registered Departments:</h2> 190 ...<a href="http://localhost/myuniversity/faculties/TF/TD">My renamed dept</a> 191 ... 192 148 193 149 194 Data Center
Note: See TracChangeset for help on using the changeset viewer.