
Selenium Design Patterns and Best Practices
By :

Writing a test that clearly states its intent, is useful in itself. However, as we get into the habit of making ourselves clearly understood, we start to notice a pattern. Behavior-driven Development (BDD) encourages us to step back and think of how the application should behave end-to-end first, and only then concentrate on the smaller details. After all, our application can be refactored many times with all of the IDs and names changing while still maintaining the same intended behavior.
By separating the implementation details from the behavior definition, our tests gain a lot of advantages:
For more information on code reuse, see the The DRY testing pattern section in Chapter...
Change the font size
Change margin width
Change background colour