com.codeborne.selenide.junit.BrowserStrategy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of selenide-junit4 Show documentation
Show all versions of selenide-junit4 Show documentation
Selenide = concise API for Selenium WebDriver
package com.codeborne.selenide.junit;
import org.junit.rules.ExternalResource;
import static com.codeborne.selenide.WebDriverRunner.closeWebDriver;
/**
* Usage:
* {@literal @}Rule
* public BrowserStrategy perTest = new BrowserStrategy();
* or
* {@literal @}ClassRule
* public static BrowserStrategy perClass = new BrowserStrategy();
*/
public class BrowserStrategy extends ExternalResource {
public BrowserStrategy() {
}
@Override
protected void after() {
closeWebDriver();
}
}