Class BrowserPerTestStrategyExtension

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

    @ParametersAreNonnullByDefault
    public class BrowserPerTestStrategyExtension
    extends java.lang.Object
    implements org.junit.jupiter.api.extension.AfterEachCallback
    By using this extension browser will be automatically closed after each test.
    To use this extension, extend your test class with it:
    @ExtendWith({BrowserPerTestStrategyExtension.class}
    Or register extension in test class:
    @RegisterExtension static BrowserPerTestStrategyExtension browserPerTestStrategy = new BrowserPerTestStrategyExtension();
    Since:
    5.21.0
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void afterEach​(org.junit.jupiter.api.extension.ExtensionContext context)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BrowserPerTestStrategyExtension

        public BrowserPerTestStrategyExtension()
    • Method Detail

      • afterEach

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