forked from Zakaria/ZenProject
fix: 3 - adding comments for test
This commit is contained in:
parent
1a722f3d61
commit
4592c1d74e
@ -1,9 +1,7 @@
|
|||||||
package zacksolutions.base;
|
package zacksolutions.base;
|
||||||
|
|
||||||
import java.io.FileInputStream;
|
import java.io.FileInputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
|
||||||
import com.aventstack.extentreports.ExtentTest;
|
import com.aventstack.extentreports.ExtentTest;
|
||||||
import com.aventstack.extentreports.reporter.ExtentSparkReporter;
|
import com.aventstack.extentreports.reporter.ExtentSparkReporter;
|
||||||
import com.aventstack.extentreports.ExtentReports;
|
import com.aventstack.extentreports.ExtentReports;
|
||||||
@ -48,11 +46,14 @@ public class Initialization {
|
|||||||
//conditioning our WebDriver with an if statement
|
//conditioning our WebDriver with an if statement
|
||||||
|
|
||||||
String browsername = prop.getProperty("browserC");
|
String browsername = prop.getProperty("browserC");
|
||||||
|
//launching FireFox
|
||||||
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");
|
||||||
driver = new FirefoxDriver();
|
driver = new FirefoxDriver();
|
||||||
driver.get(prop.getProperty("url"));
|
driver.get(prop.getProperty("url"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//launching Chrome
|
||||||
if (browsername.equalsIgnoreCase("chrome")) {
|
if (browsername.equalsIgnoreCase("chrome")) {
|
||||||
System.setProperty("web-driver.gecko.driver", "user.dir" + "/drivers/chromedriver");
|
System.setProperty("web-driver.gecko.driver", "user.dir" + "/drivers/chromedriver");
|
||||||
driver = new ChromeDriver();
|
driver = new ChromeDriver();
|
||||||
|
|||||||
@ -6,6 +6,7 @@ import org.openqa.selenium.support.PageFactory;
|
|||||||
import zacksolutions.base.Initialization;
|
import zacksolutions.base.Initialization;
|
||||||
|
|
||||||
public class HomePage extends Initialization {
|
public class HomePage extends Initialization {
|
||||||
|
//Using PageFactory Object Model we get our elemets
|
||||||
@FindBy(id="message")
|
@FindBy(id="message")
|
||||||
WebElement message;
|
WebElement message;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user