Changeset 5430 for main/waeup.sirp/branches/henrik-contactforms
- Timestamp:
- 12 Aug 2010, 17:03:39 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/branches/henrik-contactforms/src/waeup/sirp/browser/browser.txt
r5408 r5430 72 72 Content-Type: text/xml; charset=UTF-8 73 73 X-Powered-By: Zope (www.zope.org), Python (www.python.org) 74 75 Contact Form 76 ============ 77 78 Let's enter the contact form:: 79 80 >>> browser.open('http://localhost/myuniversity/contactadmin') 81 >>> print browser.contents 82 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"... 83 ...<h2>Contact</h2> 84 ... 85 86 We fill in a wrong email adress:: 87 88 >>> browser.getControl(name='email').value = "xx@yy" 89 >>> browser.getControl(name='descr').value = "test message" 90 >>> browser.getControl('Submit').click() 91 >>> print browser.contents 92 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"... 93 ...<li class="message">Error: xx@yy is not a valid email address!</li> 94 ... 95 96 Now we fill the form properly:: 97 98 >>> browser.getControl(name='email').value = "xx@yy.zz" 99 >>> browser.getControl(name='descr').value = "test message" 100 >>> browser.getControl('Submit').click() 101 >>> print browser.contents 102 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"... 103 ...<li class="message">Your message has been sent.</li> 104 ... 74 105 75 106
Note: See TracChangeset for help on using the changeset viewer.