Class SerenityPageExtension

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

    public class SerenityPageExtension
    extends java.lang.Object
    implements org.junit.jupiter.api.extension.BeforeEachCallback
    Extension for webtest support in Serenity. Must be used before {SerenityStepExtension} as step injection/instantiation requires the correct {Pages to be set}. Note that in contrast to JUnit4 {SerenityExtension} always creates the BaseStepListener without pages in order to decouple the general setup from the setup for page support. The later is the task of this extension.
    • Constructor Detail

      • SerenityPageExtension

        public SerenityPageExtension()
    • Method Detail

      • beforeEach

        public void beforeEach​(org.junit.jupiter.api.extension.ExtensionContext extensionContext)
                        throws java.lang.Exception
        Specified by:
        beforeEach in interface org.junit.jupiter.api.extension.BeforeEachCallback
        Throws:
        java.lang.Exception