Selenium Framework Types Data Driven, Keyword driven, Hybrid, POM, Pagefactory

Selenium Framework

it is a code structure that makes code maintenance easy and efficient. without framework user may place code and data at the same location which is neither reusable nor readable.

Framework Advantages:
increased code reusability,
Higher portability
better readability
reduced cost of script maintenance.

Types Of Selenium Framework

1. Data Driven Framework: it is a method of separating data set from test cases, when we separate data set from test cases. we can easily modify data set for the specific functionality. and we don’t need to change the code part that we have written. also we can fetech test cases from external files like excel, csv, database tables.

2. Keyword Driven Framework: it is a method used to increase the speed of automation testing. by separating keywords for common set of functions and instructions. we can control each functionality that we want to test.

3. Hybrid Framework: in hybrid framework we are using advantages of both data driven as well as keyword driven framework. just looking at keywords we can write the test cases.

POM:

it is a design pattern used in automation testing it reduces code duplication and improves test case maintenance. as per the pom Principle foe each webpage we have one class where we are writting the methods of that webpage in that class. and method name should be same as that of the class name.

Page Factory

it is inbuilt page object model concept present in selenium webdriver but it is optimized. used to initialize page class elements without using FindElemnts. with the help of Pagefactory in selenium we use annotations @FindBy to find Webelement. we use initelements methods to initialize web elements.

Conclusion:

here I have mentioned about Data driven which is very important in many of the interviews also along with selenium framework PageFactory and Page Object Model(POM) difference is very important from the interview point of view.