Class PageExtension

  • All Implemented Interfaces:
    org.junit.jupiter.api.extension.AfterEachCallback, org.junit.jupiter.api.extension.Extension, org.junit.jupiter.api.extension.ParameterResolver

    public class PageExtension
    extends Object
    implements org.junit.jupiter.api.extension.ParameterResolver, org.junit.jupiter.api.extension.AfterEachCallback
    • Constructor Detail

      • PageExtension

        public PageExtension()
    • Method Detail

      • afterEach

        public void afterEach​(org.junit.jupiter.api.extension.ExtensionContext extensionContext)
        Specified by:
        afterEach in interface org.junit.jupiter.api.extension.AfterEachCallback
      • supportsParameter

        public boolean supportsParameter​(org.junit.jupiter.api.extension.ParameterContext parameterContext,
                                         org.junit.jupiter.api.extension.ExtensionContext extensionContext)
                                  throws org.junit.jupiter.api.extension.ParameterResolutionException
        Specified by:
        supportsParameter in interface org.junit.jupiter.api.extension.ParameterResolver
        Throws:
        org.junit.jupiter.api.extension.ParameterResolutionException
      • resolveParameter

        public Object resolveParameter​(org.junit.jupiter.api.extension.ParameterContext parameterContext,
                                       org.junit.jupiter.api.extension.ExtensionContext extensionContext)
                                throws org.junit.jupiter.api.extension.ParameterResolutionException
        Specified by:
        resolveParameter in interface org.junit.jupiter.api.extension.ParameterResolver
        Throws:
        org.junit.jupiter.api.extension.ParameterResolutionException
      • getOrCreatePage

        public static Page getOrCreatePage​(org.junit.jupiter.api.extension.ExtensionContext extensionContext)
        Returns the Page that belongs to the current test. Will be created if it doesn't already exist. NOTE: this method is subject to change.
        Parameters:
        extensionContext - the context in which the current test or container is being executed.
        Returns:
        The Page that belongs to the current test.