Class SeleniumScreenshotExtension

java.lang.Object
org.operaton.bpm.util.SeleniumScreenshotExtension
All Implemented Interfaces:
org.junit.jupiter.api.extension.AfterTestExecutionCallback, org.junit.jupiter.api.extension.Extension, org.junit.jupiter.api.extension.TestExecutionExceptionHandler

public class SeleniumScreenshotExtension extends Object implements org.junit.jupiter.api.extension.AfterTestExecutionCallback, org.junit.jupiter.api.extension.TestExecutionExceptionHandler
Allows to take screenshots in case of a Selenium test error.
  • Field Details

    • webDriver

      protected org.openqa.selenium.WebDriver webDriver
  • Constructor Details

    • SeleniumScreenshotExtension

      public SeleniumScreenshotExtension(org.openqa.selenium.WebDriver driver)
  • Method Details

    • handleTestExecutionException

      public void handleTestExecutionException(org.junit.jupiter.api.extension.ExtensionContext context, Throwable throwable) throws Throwable
      Specified by:
      handleTestExecutionException in interface org.junit.jupiter.api.extension.TestExecutionExceptionHandler
      Throws:
      Throwable
    • afterTestExecution

      public void afterTestExecution(org.junit.jupiter.api.extension.ExtensionContext context)
      Specified by:
      afterTestExecution in interface org.junit.jupiter.api.extension.AfterTestExecutionCallback