- Install Java 17 (Ensure
JAVA_HOMEis 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 SeleniumJavaProjectSet JAVA_HOME, MAVEN_HOME, and add Allure to your system PATH.
mvn clean installmvn testallure serve target/allure-resultsA simple Java example is included in Main.java.
mvn exec:java -Dexec.mainClass="Main"- Modify
ScreenshotUtil.javato match your WebDriver setup. - Ensure
testng.xmlis 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.