fix: 3 - adding comments for test
This commit is contained in:
parent
2d83102cdc
commit
1a722f3d61
@ -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");
|
||||
|
||||
@ -9,4 +9,4 @@
|
||||
</class>
|
||||
</classes>
|
||||
</test>
|
||||
</suite>
|
||||
</suite>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user