Class ScreenshotOnFailure

  • All Implemented Interfaces:
    org.junit.rules.TestRule

    public class ScreenshotOnFailure
    extends org.junit.rules.TestWatcher
    JUnit Rule for taking screenshots/saving page HTML source of browser content on failed selenium test.
    • Constructor Detail

      • ScreenshotOnFailure

        public ScreenshotOnFailure()
    • Method Detail

      • failed

        protected void failed​(Throwable e,
                              org.junit.runner.Description description)
        Overrides:
        failed in class org.junit.rules.TestWatcher