Package net.thucydides.core.annotations
Class TestCaseAnnotations
- java.lang.Object
-
- net.thucydides.core.annotations.TestCaseAnnotations
-
public final class TestCaseAnnotations extends Object
Utility class used to inject fields into a test case.- Author:
- johnsmart
-
-
Constructor Summary
Constructors Constructor Description TestCaseAnnotations(Object testCase)
TestCaseAnnotations(Object testCase, WebDriverConfiguration configuration)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TestCaseAnnotations
forTestCase(Object testCase)
void
injectDriver(org.openqa.selenium.WebDriver driver)
Instantiate the @Managed-annotated WebDriver instance with current WebDriver if the annotated field is present.void
injectDrivers(WebdriverManager webdriverManager)
void
injectDrivers(org.openqa.selenium.WebDriver defaultDriver, WebdriverManager webdriverManager)
static boolean
isASerenityTestCase(Class<?> testClass)
boolean
isUniqueSession()
static boolean
isUniqueSession(Class<?> testClass)
static boolean
isWebTest(Class<?> testClass)
static boolean
shouldClearCookiesBeforeEachTestIn(Class<?> testClass)
static boolean
shouldUsePersistantStepLibraries(Class<?> testClass)
static boolean
supportsWebTests(Class clazz)
Does this class support web tests? Test cases that support web tests need to have at least a WebDriver field annotated with the @Managed annotation.
-
-
-
Constructor Detail
-
TestCaseAnnotations
public TestCaseAnnotations(Object testCase, WebDriverConfiguration configuration)
-
TestCaseAnnotations
public TestCaseAnnotations(Object testCase)
-
-
Method Detail
-
forTestCase
public static TestCaseAnnotations forTestCase(Object testCase)
-
injectDriver
public void injectDriver(org.openqa.selenium.WebDriver driver)
Instantiate the @Managed-annotated WebDriver instance with current WebDriver if the annotated field is present.
-
injectDrivers
public void injectDrivers(WebdriverManager webdriverManager)
-
injectDrivers
public void injectDrivers(org.openqa.selenium.WebDriver defaultDriver, WebdriverManager webdriverManager)
-
supportsWebTests
public static boolean supportsWebTests(Class clazz)
Does this class support web tests? Test cases that support web tests need to have at least a WebDriver field annotated with the @Managed annotation.
-
isUniqueSession
public boolean isUniqueSession()
-
isUniqueSession
public static boolean isUniqueSession(Class<?> testClass)
-
isWebTest
public static boolean isWebTest(Class<?> testClass)
-
shouldClearCookiesBeforeEachTestIn
public static boolean shouldClearCookiesBeforeEachTestIn(Class<?> testClass)
-
shouldUsePersistantStepLibraries
public static boolean shouldUsePersistantStepLibraries(Class<?> testClass)
-
isASerenityTestCase
public static boolean isASerenityTestCase(Class<?> testClass)
-
-