Professional Documents
Culture Documents
Type of Framework
Type of Framework
In our project, we are using Data-driven Framework by using Page Object Model
design pattern with Page Factory.
POM:
As per the Page Object Model, we have maintained a class for every web page.
Each web page has a separate class and that class holds the functionality and
members of that web page. Separate classes for every individual test.
//Difference between Page Object Model and Page Factory//
Packages:
We have separate packages for Pages and Tests. All the web page related classes
come under the Pages package and all the tests related classes come under Tests
package.
For example, Home Page and Login Page have separate classes to store element
locators. For the login test, there would be a separate class which calls the methods
from the Home Page class and Login Page class.
Framework structure
The above screenshot illustrates a standardized maven project. As per the above
maven project, all the tests are kept in the ‘src/test/java‘ and remaining files (such
as config.properties, element locators (POM classes), utility files, test data, etc.,)
kept under ‘src/main/java‘.
Page Object Model is a Design Pattern which has become popular in Selenium
Test Automation. It is widely used design pattern in Selenium for enhancing test
maintenance and reducing code duplication. Page object model (POM) can be
used in any kind of framework such as modular, data-driven, keyword driven,
hybrid framework etc. A page object is an object-oriented class that serves as an
interface to a page of your Application Under Test(AUT). The tests then use the
methods of this page object class whenever they need to interact with the User
Interface (UI) of that page. The benefit is that if the UI changes for the page, the
tests themselves don’t need to change, only the code within the page object
needs to change. Subsequently, all changes to support that new UI is located in
one place.