Collection of Selenium tests for Fakestore with Page Object Model
App links : Fakestore main page, Fakestore Docs
Fakestore is a fake web store created by @Testelka for the purpose of test automation training. Fakestore imitates a real online shop with travels and provides:
- products' descriptions on product pages
- product's categories
- ability to add products to cart and finish the order
- ability to add products to wishlist
- user account creation
This test framework is being built with Page Object Pattern.
So far, it has 11 Page Objects: ProductPage, CategoryPage, CartPage, BasePage, HeaderPage and FooterPage, CheckoutPage, OrderDetailsPage, OrderReceivedPage, MyOrdersPage, AccountPage
- the first three ones represent the whole pages with methods and locators
- BasePage is an abstract class and each PageObject class extends it
- HeaderPage and FooterPage represent compontents visible on each page in the store
- the last five were added during creation of CheckoutTests and also represent pages with methods and locators
- check that user can add product to cart from product page
- check that user can add product to cart from category page
- check that user can add 10 products to cart
- check that user can modify amount of product on the product page
- check that user can add 10 different products to cart
- check that user can modify amount of product on the cart page
- check that user can remove product on the cart page
- check that user can finish order without creating new account
- check that user can finish order after logging to existing account
- check that user can finish order with creating new account
- check that user can view order in "My Account" section
- check validations for all mandatory fields during checkout
There are few ways to start using this repository:
- Clone with Git using command line and this command:
git clone https://github.com/kat-kan/fakestore-selenium-tests
- Clone with Git using graphical user interface (for example Sourcetree)
You can run tests:
- using "Run test" option in Intellij Idea IDE
⚠️ in Java 19 we need to add VM options "-Dstdout.encoding=UTF-8 -Dstderr.encoding=UTF-8 -Dfile.encoding=UTF-8" in run test config to see correct Polish letters - using
mvn clean test
command in terminal