- Install Java 17 (Ensure
JAVA_HOME
is set correctly) - Install Maven (Check installation with
mvn -version
) - Install Allure CLI (Check installation with
allure --version
) - Install Google Chrome & Chromedriver
SeleniumJavaProject/
│-- src/
│ ├── main/
│ │ ├── java/
│ │ │ ├── utils/
│ │ │ │ ├── ScreenshotUtil.java
│ │ │ │ ├── AllureEnvironmentUtil.java
│ │ │ ├── Main.java
│ ├── resources/
│ ├── test/
│ │ ├── java/
│ │ │ ├── tests/
│ │ │ │ ├── hiselenium.java
│ │ │ │ ├── SauceDemoTest.java
│ ├── resources/
│-- pom.xml
│-- testng.xml
│-- README.md
git clone https://github.com/your-repo/SeleniumJavaProject.git](https://github.com/aljazarifoundation/SeleniumJavaFunctional.git
cd SeleniumJavaProject
Set JAVA_HOME
, MAVEN_HOME
, and add Allure
to your system PATH
.
mvn clean install
mvn test
allure serve target/allure-results
A simple Java example is included in Main.java
.
mvn exec:java -Dexec.mainClass="Main"
- Modify
ScreenshotUtil.java
to match your WebDriver setup. - Ensure
testng.xml
is correctly configured for your test suite. - Screenshots are saved in
target/screenshots/
and attached in Allure reports.
For troubleshooting, check the logs/
folder for errors.