Class BrowserStrategyExtension

java.lang.Object
com.codeborne.selenide.junit5.BrowserStrategyExtension
All Implemented Interfaces:
org.junit.jupiter.api.extension.AfterAllCallback, org.junit.jupiter.api.extension.Extension

@ParametersAreNonnullByDefault public class BrowserStrategyExtension extends Object implements org.junit.jupiter.api.extension.AfterAllCallback
By using this extension browser will be automatically closed after all tests in the current container.
To use this extension, extend your test class with it:
@ExtendWith({BrowserStrategyExtension.class}
Or register extension in test class:
@RegisterExtension static BrowserStrategyExtension browserStrategy = new BrowserStrategyExtension();
Since:
4.12.2
  • Constructor Details

    • BrowserStrategyExtension

      public BrowserStrategyExtension()
  • Method Details

    • afterAll

      public void afterAll(org.junit.jupiter.api.extension.ExtensionContext context)
      Specified by:
      afterAll in interface org.junit.jupiter.api.extension.AfterAllCallback