Class ScreenshotExtension

  • All Implemented Interfaces:
    org.junit.jupiter.api.extension.Extension, org.junit.jupiter.api.extension.TestExecutionExceptionHandler

    public class ScreenshotExtension
    extends java.lang.Object
    implements org.junit.jupiter.api.extension.TestExecutionExceptionHandler
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void createScreenshot​(org.junit.jupiter.api.extension.ExtensionContext context, org.openqa.selenium.WebDriver driver)  
      void handleTestExecutionException​(org.junit.jupiter.api.extension.ExtensionContext extensionContext, java.lang.Throwable throwable)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ScreenshotExtension

        public ScreenshotExtension()
    • Method Detail

      • handleTestExecutionException

        public void handleTestExecutionException​(org.junit.jupiter.api.extension.ExtensionContext extensionContext,
                                                 java.lang.Throwable throwable)
                                          throws java.lang.Throwable
        Specified by:
        handleTestExecutionException in interface org.junit.jupiter.api.extension.TestExecutionExceptionHandler
        Throws:
        java.lang.Throwable
      • createScreenshot

        public void createScreenshot​(org.junit.jupiter.api.extension.ExtensionContext context,
                                     org.openqa.selenium.WebDriver driver)
                              throws java.lang.Throwable
        Throws:
        java.lang.Throwable