BP30: Use PageObjects Pattern
Create one class for each screen of your application. This class will then expose actions available on the screen. And it will encapsulate logic for finding controls and elements on the page. Such page can be easily reused on multiple places of the testing code.
Pros
- Clean separation between test code and page logic
- Page actions and controls can be easily consumed
- More robust and reliable, less fragile tests
- Better maintenability of the tests
- Bette reusability of the logic
- Code duplication doesn't happen