Skip to content

Instantly share code, notes, and snippets.

@JamesZoft
Created April 3, 2019 16:47
Show Gist options
  • Save JamesZoft/1d6c1c6bf24975a11675c82558428863 to your computer and use it in GitHub Desktop.
Save JamesZoft/1d6c1c6bf24975a11675c82558428863 to your computer and use it in GitHub Desktop.
Injecting a Jupiter extension into a JUnit test
class MyTest {
//...
private WebDriver driver;
@RegisterExtension
TakeScreenshotOnFailureExtension takeScreenshotOnFailureExtension = new TakeScreenshotOnFailureExtension(driver);
//...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment