Until now, we were writing Selenium WebDriver tests directly into Python classes using
unittest. We were specifying locators and test case steps into these classes. This code is good to start; however, as we progress on, adding more and more tests to our tests suite, it will become difficult to maintain. This will make tests brittle.
Developing maintainable and reusable test code is important for sustainable test automation and the test code should be treated as production code and similar standards and patterns should to be applied while developing the test code.
To overcome these problems, we can use various design patterns and principles such as Don't Repeat Yourself (DRY), and code refactoring techniques while creating ...