diff --git a/src/main/java/zacksolutions/base/Initialization.java b/src/main/java/zacksolutions/base/Initialization.java index 459e760..b7e3b02 100644 --- a/src/main/java/zacksolutions/base/Initialization.java +++ b/src/main/java/zacksolutions/base/Initialization.java @@ -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"); diff --git a/testng.xml b/testng.xml index 47f3650..c1bf53f 100644 --- a/testng.xml +++ b/testng.xml @@ -9,4 +9,4 @@ - \ No newline at end of file +