Class BrowserTestRule

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

    public class BrowserTestRule
    extends Object
    implements org.junit.rules.TestRule
    Allows ignoring some tests for a given browser.
     public class MyTestClass
     {
      @Rule
      public BrowserTestRule browseTestRule = new BrowserTestRule(getDriver());
    
            @Test
      @IgnoreBrowser(value = {"firefox"}, reason="some reason for ignoring the test...")
            public void myTest()
            {
            ...
            }
     }
     
    Since:
    3.5M1
    Version:
    $Id: 21b1b460cd2596c59a5f59cfe72a0bebfae4936d $
    • Constructor Detail

      • BrowserTestRule

        public BrowserTestRule​(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