public class AbstractDriverTestNG extends Object implements org.testng.ITest
| Modifier and Type | Field and Description |
|---|---|
static com.aventstack.extentreports.ExtentReports |
extent |
RetryTest |
retry |
static ThreadLocal<com.aventstack.extentreports.ExtentTest> |
step |
static ThreadLocal<String> |
testName |
| Constructor and Description |
|---|
AbstractDriverTestNG() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterClassMethod(org.testng.ITestContext iTestContext)
After class batch log print is called here, cause this after class method is called after all other after class
methods
|
String |
getTestName() |
static org.openqa.selenium.WebDriver |
getWebDriver() |
void |
handleTestMethodName(Method method,
Object[] testData)
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(org.testng.ITestResult iTestResult) |
public static com.aventstack.extentreports.ExtentReports extent
public static ThreadLocal<com.aventstack.extentreports.ExtentTest> step
public static ThreadLocal<String> testName
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, Object[] testData)
public static org.openqa.selenium.WebDriver getWebDriver()
@AfterMethod public void shutdown(org.testng.ITestResult iTestResult)
@AfterClass public void afterClassMethod(org.testng.ITestContext iTestContext)
iTestContext - public String getTestName()
getTestName in interface org.testng.ITestCopyright © 2019. All rights reserved.