public class AbstractDriverTestNG extends Object
| Modifier and Type | Field and Description |
|---|---|
static Map<String,com.aventstack.extentreports.ExtentTest> |
classList |
static com.aventstack.extentreports.ExtentReports |
extent |
RetryTest |
retry |
static ThreadLocal<com.aventstack.extentreports.ExtentTest> |
step |
| Constructor and Description |
|---|
AbstractDriverTestNG() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterMethod(Method method)
initialize after method
|
static org.openqa.selenium.WebDriver |
getWebDriver() |
void |
handleTestMethodName(Method method)
generates new testId from class name And test name if already generated, Then
return existing
|
static void |
initTest(DriverObject driverObject)
initialized testInfo with testId as key runs before test adds current driver
info to test object
|
void |
setupApiDriver(ServiceObject apiObject) |
static org.openqa.selenium.WebDriver |
setupWebDriver(DriverObject driverObject)
setup driver for web and mobile testing
if single sign in is enabled, we try to reuse the existing drivers if available
|
void |
setupWebDriver(String testId,
DriverObject driver)
initialize test based on testId
|
static void |
setWebDriver(org.openqa.selenium.WebDriver webDriver) |
void |
shutdown() |
public static com.aventstack.extentreports.ExtentReports extent
public static ThreadLocal<com.aventstack.extentreports.ExtentTest> step
public RetryTest retry
public void setupApiDriver(ServiceObject apiObject) throws Exception
Exceptionpublic static org.openqa.selenium.WebDriver setupWebDriver(DriverObject driverObject) throws Exception
driverObject - Exceptionpublic void setupWebDriver(String testId, DriverObject driver)
testId - driver - public static void initTest(DriverObject driverObject)
driverObject - public static void setWebDriver(org.openqa.selenium.WebDriver webDriver)
@BeforeMethod(alwaysRun=true) public void handleTestMethodName(Method method)
@AfterMethod(alwaysRun=true) public void afterMethod(Method method)
method - public static org.openqa.selenium.WebDriver getWebDriver()
@AfterMethod public void shutdown()
Copyright © 2019. All rights reserved.