This is an Automation project using Java with Selenium Webdriver, developed by Douglas Urrea Ocampo to improve learning on advanced Automation testing.
The main features of this project has the following:
- Page Object Model (POM) as a design pattern for creating an Object directory for web UI elements.
- Encapsulation and Data Abstraction to bind together the data and the functions that operate on them so that no other part of the code can access this data except that function.
- The re-usability of code to avoid unnecessary data exposure to the user by using the abstraction.
- Name:
Douglas Urrea Ocampo
- Country:
Colombia
- City:
Medellin
- E-mail:
[email protected]
- LinkedIn: https://www.linkedin.com/in/douglasfugazi
- Contact: https://douglasfugazi.co
- Install Selenium Webdriver from here
- Get WebDriverManager from here
- Install git from here
- Install Apache Maven from here
- Test Runner is JUnit 5
- Build Tool is Maven the latest version
- Note: ChromeDriver.exe is not necessary, you should use the WebDriverManager capabilities.
- Download the project from GitHub
- Option 1:
git clone https://github.com/fugazi/carbon-love-selenium-webdriver.git
- Option 2: Download it as a Zip file and extract it
- Option 1:
- CD into the
Carbon Love
folder - Set up Apache Maven
- Maven:
Update Maven Archetype Catalog
- Maven:
- Set up Selenium Project
- Maven: Create Maven Project Type adding
Selenium
as archetype
- Maven: Create Maven Project Type adding
- Running Tests
- run
mvn clean install
in the path of the project
- run
- Open the project baseline and run each Selenium Test
TBA
- Selenium project Baseline:
Carbon Love
- Selenium Tests
MainPageTest.java
(Tets without Authentication) into foldersrc\test\java\carbonlove
- Selenium Tests
LoginTest.java
(Tests with Login Credentials) into foldersrc\test\java\carbonlove
- Base Utility class
BaseLogin.java
into foldersrc\test\java\carbonlove\BaseUtility
- Login Credentials class
LoginCredentials.java
into foldersrc\test\java\carbonlove\BaseUtility
- Page Objects
MainPage.java
into foldersrc\test\java\carbonlove\Page
- Page Objects
LoginPage.java
into foldersrc\test\java\carbonlove\Page
- testName:
CarbonLove
This is an end-to-end UI tests using Selenium Webdriver. The website under test was developed by SauceLabs here with a login frontpage in order to test different login access and difficult to work with locators on the UI. I must say it was fun learning and automating this website.
- Browser is Microsoft Edge in order to have a different approach to login
- User will navigate to the website and login with different access:
- Test login with valid credentials: STANDARD_USER
- Test login with error message: LOCKED_OUT_USER
- Test login with invalid credentials: INVALID_USER
- Once the Login step is successful, registered user will log in the website.
- After the login, assertions will be validated to each test, user will check for the logo and the items displayed on top of the banner menu.
- Each tests will finish automatically and the browser will be closed.