| | 25 | Initialize the test browser |
|---|
| | 26 | |
|---|
| | 27 | >>> from Products.Five.testbrowser import Browser |
|---|
| | 28 | >>> browser = Browser() |
|---|
| | 29 | >>> browser.handleErrors = False |
|---|
| | 30 | |
|---|
| | 31 | Let us log all exceptions, which is useful for debugging. Also, clear portlet |
|---|
| | 32 | slots, to make the test browser less confused by things like the recent portlet |
|---|
| | 33 | and the navtree. |
|---|
| | 34 | |
|---|
| | 35 | >>> self.portal.error_log._ignored_exceptions = () |
|---|
| | 36 | >>> self.portal.left_slots = self.portal.right_slots = [] |
|---|
| | 37 | |
|---|
| | 38 | Browse the entity |
|---|
| | 39 | |
|---|
| | 40 | >>> entity_url = entity.absolute_url() |
|---|
| | 41 | >>> browser.open(entity_url) |
|---|
| | 42 | |
|---|
| | 43 | Check the URL |
|---|
| | 44 | |
|---|
| | 45 | >>> browser.url == entity_url |
|---|
| | 46 | True |
|---|
| | 47 | >>> browser.url.endswith('aaa') |
|---|
| | 48 | True |
|---|
| | 49 | |
|---|
| | 50 | Check the html content of the view page (description will not appear here) |
|---|
| | 51 | >>> browser.contents |
|---|
| | 52 | '...Historical Names...' |
|---|