fix: 3 - adding comments for test

This commit is contained in:
dadgam3er 2024-09-27 21:32:39 -04:00
parent 2d83102cdc
commit 1a722f3d61
2 changed files with 8 additions and 2 deletions

View File

@ -12,6 +12,8 @@ import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
public class Initialization {
//let's set up our variables
public static WebDriver driver;
public static Properties prop;
public static ExtentReports extent;
@ -19,7 +21,7 @@ public class Initialization {
public Initialization() {
// let's use the config.properties file to set up our global variables...
try {
prop = new Properties();
@ -34,6 +36,8 @@ public class Initialization {
}
public void BrowserInit() {
//our EXTENTREPORTS SETUP!
String path = System.getProperty("user.dir") + "/reports/index.html";
ExtentSparkReporter spark = new ExtentSparkReporter(path);
spark.config().setDocumentTitle("Zen Test Case");
@ -41,6 +45,8 @@ public class Initialization {
extent = new ExtentReports();
extent.attachReporter(spark);
extent.setSystemInfo("Test Done By: ", "Sami");
//conditioning our WebDriver with an if statement
String browsername = prop.getProperty("browserC");
if (browsername.equalsIgnoreCase("firefox")) {
System.setProperty("web-driver.gecko.driver","user.dir" + "/drivers/geckodriver");

View File

@ -9,4 +9,4 @@
</class>
</classes>
</test>
</suite>
</suite>