where do you use abstraction in your framework

Solutions on MaxInterview for where do you use abstraction in your framework by the best coders in the world

showing results for - "where do you use abstraction in your framework"
Vanessa
05 Jan 2017
1I used in defining a common super class while writing POM layer of the framework
2We usually create an abstract class named
3BasePage to have all common members for every page written
4in this class like getPageTitle().
5Then each Page class (HomePage, LoginPage, DashboardPage
6etc.) inherit from BasePage.
7Sometimes one may need to change the behavior of methods
8implemented in superclass. So, subclass has freedom to
9override that method where we use polymorphism.
10This is how we use Abstract class in real projects.
Tom
04 May 2020
1I have created my PageBase class as super
2class of the all page classes. 
3I have collected all common elements
4and functions into PageBase class and
5all other page classes extent PageBase class.
6By doing so, I don't have to locate very
7common WebElements and it provides
8reusability in my framework.
9
10I  have implement abstraction in my POJO
11classes for API Testing. My POJO classes
12implements Comparable interface and
13I override the compareTo() abstract method. 
14
15These concepts are commonly used in
16  framework development. Abstract class
17    is used in defining a common super
18class while writing Page Object Model 
19layer of the framework. We usually create 
20an abstract class named PageBase to have
21all common members for every page written 
22in this class for example getPageTitle(). 
23Then each Page class 
24  (HomePage, LoginPage, DashboardPage etc.)
25inherit from BasePage. Sometimes one
26may need to change the behavior of 
27methods implemented in superclass. 
28So, subclass has freedom to override 
29that method where we use polymorphism. 
30This is how we use Abstract class in projects.
31
Beatrice
12 Oct 2016
1I used in defining a common super class while writing POM layer of the framework
2We usually create an abstract class named
3BasePage to have all common members for every page written
4in this class like getPageTitle().
5Then each Page class (HomePage, LoginPage, DashboardPage
6etc.) inherit from BasePage.
7Sometimes one may need to change the behavior of methods
8implemented in superclass. So, subclass has freedom to
9override that method where we use polymorphism.
10This is how we use Abstract class in real projects