Package org.finos.fluxnova.bpm.util
Class SeleniumScreenshotRule
java.lang.Object
org.finos.fluxnova.bpm.util.SeleniumScreenshotRule
- All Implemented Interfaces:
org.junit.jupiter.api.extension.Extension,org.junit.jupiter.api.extension.TestExecutionExceptionHandler
public class SeleniumScreenshotRule
extends Object
implements org.junit.jupiter.api.extension.TestExecutionExceptionHandler
Allows to take screenshots in case of an selenium test error.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcaptureScreenShot(org.junit.jupiter.api.extension.ExtensionContext context) voidhandleTestExecutionException(org.junit.jupiter.api.extension.ExtensionContext context, Throwable throwable)
-
Field Details
-
webDriver
protected org.openqa.selenium.WebDriver webDriver
-
-
Constructor Details
-
SeleniumScreenshotRule
public SeleniumScreenshotRule(org.openqa.selenium.WebDriver driver)
-
-
Method Details
-
handleTestExecutionException
public void handleTestExecutionException(org.junit.jupiter.api.extension.ExtensionContext context, Throwable throwable) throws Throwable - Specified by:
handleTestExecutionExceptionin interfaceorg.junit.jupiter.api.extension.TestExecutionExceptionHandler- Throws:
Throwable
-
captureScreenShot
public void captureScreenShot(org.junit.jupiter.api.extension.ExtensionContext context)
-