Page object model framework
Page object model framework:
Step1:
Create packages:
In page object model(POM) framework we need to create two packages
In Eclipse IDE Right click on project----new----package
1) Enter name as (ex:"tests") with single word lowercase-----click finish
and we need to create second package
In Eclipse IDE Right click on project----new----package
2) Enter name as (ex:"pages") with single word lowercase-----click finish
Step2:
Create Classes:
First we need to develop page classes
If you need to remember if any project how many pages are loaded from browser
for example gmail login page have 2 pages (1 is userid and 2nd is password)
in this project i am developing 2 page classes
1) In Eclipse IDE Right click on package----new----Class
enter name as class (ex:Homepage) with initcap--------deselect main() method option
----click Finish
2) In Eclipse IDE Right click on package----new----Class
enter name as class (ex:Loginpage)single word with initcap--- deselect main() method
----click Finish
Step1:
Create packages:
In page object model(POM) framework we need to create two packages
In Eclipse IDE Right click on project----new----package
1) Enter name as (ex:"tests") with single word lowercase-----click finish
and we need to create second package
In Eclipse IDE Right click on project----new----package
2) Enter name as (ex:"pages") with single word lowercase-----click finish
Step2:
Create Classes:
First we need to develop page classes
If you need to remember if any project how many pages are loaded from browser
for example gmail login page have 2 pages (1 is userid and 2nd is password)
in this project i am developing 2 page classes
1) In Eclipse IDE Right click on package----new----Class
enter name as class (ex:Homepage) with initcap--------deselect main() method option
----click Finish
2) In Eclipse IDE Right click on package----new----Class
enter name as class (ex:Loginpage)single word with initcap--- deselect main() method
----click Finish
- Follow above navigation to create multiple classes in "pages" package
- Implement locators and methods in each class with respect to pages in software.
Comments
Post a Comment