Package com.codeborne.selenide.junit5
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
public class BrowserStrategyExtension
extends Object
implements org.junit.jupiter.api.extension.AfterAllCallback
JUnit extension to automatically close browser after all tests.
To use this extension, annotate your test class:
@ExtendWith({BrowserStrategyExtension.class}
Or register the extension in test class:
@RegisterExtension static BrowserStrategyExtension browserStrategy = new BrowserStrategyExtension();
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
afterAll
(org.junit.jupiter.api.extension.ExtensionContext context)
-
Constructor Details
-
BrowserStrategyExtension
public BrowserStrategyExtension()
-
-
Method Details
-
afterAll
public void afterAll(org.junit.jupiter.api.extension.ExtensionContext context) - Specified by:
afterAll
in interfaceorg.junit.jupiter.api.extension.AfterAllCallback
-