Package com.codeborne.selenide.junit5
Class BrowserPerTestStrategyExtension
java.lang.Object
com.codeborne.selenide.junit5.BrowserPerTestStrategyExtension
- All Implemented Interfaces:
org.junit.jupiter.api.extension.AfterEachCallback
,org.junit.jupiter.api.extension.Extension
public class BrowserPerTestStrategyExtension
extends 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:
Or register extension in test class:
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();
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
afterEach
(org.junit.jupiter.api.extension.ExtensionContext context)
-
Constructor Details
-
BrowserPerTestStrategyExtension
public BrowserPerTestStrategyExtension()
-
-
Method Details
-
afterEach
public void afterEach(org.junit.jupiter.api.extension.ExtensionContext context) - Specified by:
afterEach
in interfaceorg.junit.jupiter.api.extension.AfterEachCallback
-