This is a sample project to demonstrate what is page object model framework and how it can used in selenium (This is only one way of implementing page object framework ).
junit is used as test framework. Sample application used for automation is http://accountsdemo.herokuapp.com/.
- Java
- Maven
###libraries used
- Selenium
- Junit
- log4j
git clone https://github.com/reachbharathan/Java-Junit-POM-AccountsDemo.git
cd Selenium-Page-Object-Model-Junit-Java
mvn clean test
- First have a look into the http://accountsdemo.herokuapp.com/ repo and create a test account register the
- Go to testSuite1 folder and go through the each @test in the class by step order
- Then proceed to testSuite2 and go through the class by step order
- Right click and Run each @test from any of the ide like intelliJ or eclipse and understand the test scenario flow
- Execute
mvn clean test site
from root folder, index.html report will be generated in target folder - The entire test suite can be executed from a single test runner file "TestRunner"
- For ease of use i have used chrome driver, ensure to reference to correct path of the chrome driver in the properties file depending on the path and OS
- This is just a sample project feel free to add more tests and mocks if interested.