All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.codeborne.selenide.testng.BrowserPerClass Maven / Gradle / Ivy

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();
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy