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