This project automates two web forms and scrapes a table from a website using Selenium WebDriver and JUnit. The main tasks are:
- Automate form submission on Digital Unite Webform
- Automate guest registration on WP Everest Form
- Scrape stock market data from DSEBD Website
- Java 17
- Selenium WebDriver
- JUnit (for testing)
- Gradle (for project management)
- ChromeDriver (for browser automation)
Before running the tests, ensure the following:
- Java 17 or higher
- ChromeDriver (or another WebDriver if you're using a different browser)
The project dependencies for Selenium WebDriver and JUnit 5 are already configured in the build.gradle
file:
dependencies {
testImplementation platform('org.junit:junit-bom:5.10.0')
testImplementation 'org.junit.jupiter:junit-jupiter'
implementation 'org.seleniumhq.selenium:selenium-java:4.31.0'
}
-
Clone the repo:
git clone https://github.com/ShababAhmedd/AutomatedWebFormsAndScraping
-
Set Up ChromeDriver Make sure ChromeDriver is properly set up and available in your system's PATH.
- Download ChromeDriver from: ChromeDriver Download
- Ensure that the downloaded
chromedriver
binary is added to your system’s PATH. - Alternatively, specify the path to ChromeDriver in your test code if it’s not in the PATH.
Example (if you're setting it manually in your code):
System.setProperty("webdriver.chrome.driver", "/path/to/chromedriver");
-
Run all tests with Gradle:
./gradlew test
This will execute all the tests in the project.
To run a specific test class (e.g., DigitalUniteForm), use:
./gradlew test --tests "PracticeWebform"
Replace "PracticeWebform" with the name of any test class you want to run.
-
Check test results in the build/reports/tests/test folder.
- This folder contains detailed HTML test report for the test class you run.
- You can open the
index.html
file to view test results, or check the console logs for additional details.
WebForms.mp4
userRegistration.mp4
TableDataScrap_c.mp4
.
├── src
│ ├── main
│ │ └── java
| | └── resources
│ └── test
| ├── java
| │ ├── PracticeWebform.java
| │ ├── TableDataScrap.java
| │ └── UserRegistration.java
| └── resources
├── DSE.txt
├── README.md