package com.mridul.framework.selenium.tests;
import com.mridul.framework.selenium.modals.WebAuthorHelpModal;
import com.mridul.framework.selenium.pages.HomePage;
import com.mridul.framework.selenium.pages.LoginPage;
import com.mridul.framework.selenium.modals.ReportAnIssueModal;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.testng.annotations.*;
import static org.testng.Assert.assertNotNull;
/**
* Created by Mridul on 3/11/2016.
*/
public abstract class AbstractTest {
protected WebDriver driver;
protected LoginPage loginPage;
protected HomePage homePage;
protected ReportAnIssueModal reportAnIssueModal;
protected WebAuthorHelpModal webAuthorHelpModal;
public String expectedURL="https://www.google.com";
//@BeforeSuite(enabled = true)
@BeforeTest(enabled = true)
public void setUp() {
////TODO-Fix spring injection
System.setProperty("webdriver.chrome.driver", "src/main/resources/drivers/chromedriver.exe");
driver = new ChromeDriver();
/*
System.setProperty("webdriver.ie.driver", "src/main/resources/drivers/IEDriverServer.exe");
driver = new InternetExplorerDriver();*/
}
@AfterTest(enabled = false)
public void closePage(){
loginPage.closePage();
}
@AfterSuite(enabled = false)
public void tearDown() {
if (driver != null) {
driver.quit();
}
}
}
Friday, August 5, 2016
AbstractTest
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment