com.codeborne.selenide.testng.BrowserPerClass Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of selenide-testng Show documentation
Show all versions of selenide-testng Show documentation
Selenide = concise API for Selenium WebDriver
package com.codeborne.selenide.testng;
import org.testng.ITestContext;
import org.testng.reporters.ExitCodeListener;
import javax.annotation.ParametersAreNonnullByDefault;
import static com.codeborne.selenide.WebDriverRunner.closeWebDriver;
/**
* Annotate your test class with {@code @Listeners({ BrowserPerClass.class})}
*/
@ParametersAreNonnullByDefault
public class BrowserPerClass extends ExitCodeListener {
@Override
public void onFinish(ITestContext context) {
super.onFinish(context);
closeWebDriver();
}
}