From the course: Advanced Selenium: Page Objects and GUI Automation

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Dos and don'ts

Dos and don'ts

From the course: Advanced Selenium: Page Objects and GUI Automation

Start my 1-month free trial

Dos and don'ts

- [Instructor] We make decisions when coding and creating abstractions. And there's no one right way. But I do think that there are patterns which are more negative than positive for long term use. So I will explain some of my do's and don'ts associated with abstractions, and what long term costs we might accrue by using them. Very often people think of abstractions as something complicated, but it can be as simple as the naming and code organization that we use. The structure of our code with the package hierarchy can aid abstractions. Some people worry about having too many classes, which then become hard to navigate or understand that putting your classes in an organized structure can help with that. And don't worry about getting that right first time. You can refactor your tests and organize them in the IDE without impacting your code very much. I try to keep my abstractions separate from my test code, and I often put…

Contents