Changeset 4869 for waeup/trunk/src
- Timestamp:
- 21 Jan 2010, 09:02:35 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
waeup/trunk/src/waeup/browser/batchprocessing.txt
r4868 r4869 3 3 4 4 :test-layer: functional 5 6 Preliminaries: 7 8 We define a function that looks up a form with several submit buttons 9 for the one with a given value (this functionality is missing in 10 zope.testbrowser): 11 12 >>> def lookup_submit_value(name, value, browser): 13 ... """Find a button with a certain value.""" 14 ... for num in range(0, 100): 15 ... try: 16 ... button = browser.getControl(name=name, index=num) 17 ... if button.value == value: 18 ... return button 19 ... except IndexError: 20 ... break 21 ... return None 5 22 6 23 Create a site: … … 60 77 61 78 >>> browser.getLink('Batch processing').click() 62 >>> browser.getControl(name='select', index=0).click() 79 >>> button = lookup_submit_value( 80 ... 'select', 'faculties_zope.mgr.csv', browser) 81 >>> button.click() 63 82 64 83 Step 2: select a processor and mode: … … 160 179 161 180 >>> browser.getLink('Batch processing').click() 162 >>> browser.getControl(name='select', index=0).click() 181 >>> button = lookup_submit_value( 182 ... 'select', 'departments_zope.mgr.csv', browser) 183 >>> button.click() 163 184 164 185 Step 2: select a processor and mode: … … 223 244 224 245 >>> browser.getLink('Batch processing').click() 225 >>> browser.getControl(name='select', index=0).click() 246 >>> button = lookup_submit_value( 247 ... 'select', 'courses_zope.mgr.csv', browser) 248 >>> button.click() 226 249 227 250 Step 2: select a processor and mode: … … 286 309 287 310 >>> browser.getLink('Batch processing').click() 288 >>> browser.getControl(name='select', index=0).click() 311 >>> button = lookup_submit_value( 312 ... 'select', 'certificates_zope.mgr.csv', browser) 313 >>> button.click() 314 289 315 290 316 Step 2: select a processor and mode: … … 349 375 350 376 >>> browser.getLink('Batch processing').click() 351 >>> browser.getControl(name='select', index=0).click() 377 >>> button = lookup_submit_value( 378 ... 'select', 'mycertcourses_zope.mgr.csv', browser) 379 >>> button.click() 352 380 353 381 Step 2: select a processor and mode:
Note: See TracChangeset for help on using the changeset viewer.