Web Automation using Selenium Java
A web automation project to ease daily attendance in my Office Intranet System built using Selenium in Java.
About The Project
This project explores Selenium as a Web Automation tool rather than UI Testing Tool. I have automated a task of daily attendance that I need to do in every working day before starting my office. Due to records of me missing attendance for multiple days, I wanted to automate this behavior, and finally succeeded.
Feels good waking up to this log every morning 😂
Built With
- Java 8 as programming language
- Maven for Package Management and Build Automation
- Selenium for Web Automation
- Resteasy as JAX-RS implementation for Restful Services
Getting Started
Prerequisites
Basic understanding of Java with Maven.
Running the project
Steps are listed below to get this project up and running in your development environment.
- Setup Java with JDK 1.8. For reference: Use this official Tutorial
- Setup Maven. Follow this link: Maven Setup
- Clone this repository in your target folder.
git clone https://github.com/bishwa-poudel/selenium-web-automation-example.git
- Now go to
src/main/resources-filtered/intranet.sample.properties
and rename the configuration file tointranet.properties
. Also, give your LIS Intranet credentials in properties file.
Example:
# file: intranet.properties
#**************************** LIS Intranet Creds *************************
INTRANET_USERNAME=username # Your username
INTRANET_PASSWORD=password # Your password
- Finally run maven build command:
mvn clean install
- Once you see this message in the console, your build is ready. Goto
target/lis-intranet-automation.war}
to get the archived file.
Note: I have used WAR for packaging. If you want to build into the jar file, change the <packaging>
inside pom.xml file to jar.
<packaging>jar</packaging>
Now you can use any application server to deploy the archived java file. For this project I am using Wildfly v22.0.1
Congrats !!! You are now able to run the project in your own development environment.
Usage
Server automatically schedules intranet check in and check out time for the next day in every restart. There is also APIs exposed for manual check in and check out.
For Manual Check in
GET /lis-intranet-automation/api/action/checkin
For Manual Checkout
GET /lis-intranet-automation/api/action/checkout
Authors
- Bishwa Poudel - Initial work - Bishwa Poudel
License
This project is licensed under the MIT License - see the LICENSE.md file for details