Class SeleniumScreenshotRule

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

    public class SeleniumScreenshotRule
    extends java.lang.Object
    implements org.junit.rules.TestRule
    Allows to take screenshots in case of an selenium test error.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.openqa.selenium.WebDriver webDriver  
    • Constructor Summary

      Constructors 
      Constructor Description
      SeleniumScreenshotRule​(org.openqa.selenium.WebDriver driver)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.junit.runners.model.Statement apply​(org.junit.runners.model.Statement base, org.junit.runner.Description description)  
      • Methods inherited from class java.lang.Object

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

      • webDriver

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

      • SeleniumScreenshotRule

        public SeleniumScreenshotRule​(org.openqa.selenium.WebDriver driver)
    • Method Detail

      • apply

        public org.junit.runners.model.Statement apply​(org.junit.runners.model.Statement base,
                                                       org.junit.runner.Description description)
        Specified by:
        apply in interface org.junit.rules.TestRule