Package net.thucydides.core.annotations
Class TestCaseAnnotations
java.lang.Object
net.thucydides.core.annotations.TestCaseAnnotations
public final class TestCaseAnnotations
extends java.lang.Object
Utility class used to inject fields into a test case.
- Author:
- johnsmart
-
Constructor Summary
Constructors Constructor Description TestCaseAnnotations(java.lang.Object testCase)TestCaseAnnotations(java.lang.Object testCase, WebDriverConfiguration configuration) -
Method Summary
Modifier and Type Method Description static TestCaseAnnotationsforTestCase(java.lang.Object testCase)voidinjectDriver(org.openqa.selenium.WebDriver driver)Instantiate the @Managed-annotated WebDriver instance with current WebDriver if the annotated field is present.voidinjectDrivers(WebdriverManager webdriverManager)voidinjectDrivers(org.openqa.selenium.WebDriver defaultDriver, WebdriverManager webdriverManager)static booleanisASerenityTestCase(java.lang.Class<?> testClass)booleanisUniqueSession()static booleanisUniqueSession(java.lang.Class<?> testClass)static booleanisWebTest(java.lang.Class<?> testClass)static booleanshouldClearCookiesBeforeEachTestIn(java.lang.Class<?> testClass)static booleanshouldUsePersistantStepLibraries(java.lang.Class<?> testClass)static booleansupportsWebTests(java.lang.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.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
TestCaseAnnotations
-
TestCaseAnnotations
public TestCaseAnnotations(java.lang.Object testCase)
-
-
Method Details
-
forTestCase
-
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
-
injectDrivers
public void injectDrivers(org.openqa.selenium.WebDriver defaultDriver, WebdriverManager webdriverManager) -
supportsWebTests
public static boolean supportsWebTests(java.lang.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(java.lang.Class<?> testClass) -
isWebTest
public static boolean isWebTest(java.lang.Class<?> testClass) -
shouldClearCookiesBeforeEachTestIn
public static boolean shouldClearCookiesBeforeEachTestIn(java.lang.Class<?> testClass) -
shouldUsePersistantStepLibraries
public static boolean shouldUsePersistantStepLibraries(java.lang.Class<?> testClass) -
isASerenityTestCase
public static boolean isASerenityTestCase(java.lang.Class<?> testClass)
-