com.atlassian.webdriver.testing.rule
Class IgnoreBrowserRule

java.lang.Object
  extended by com.atlassian.webdriver.testing.rule.IgnoreBrowserRule
All Implemented Interfaces:
org.junit.rules.TestRule

public class IgnoreBrowserRule
extends Object
implements org.junit.rules.TestRule

A rule that allows annotating test methods with the IgnoreBrowser annotation and will skip the test if the current running driver is in the list of browsers to ignore.

Also skips tests annotated with RequireBrowser if they require a particular browser that is not currently running.

Currently still supports the deprecated annotations IgnoreBrowser and TestBrowser but this will be dropped in the future. Please make sure to move to the equivalents from the pageobjects-api module.

Requires surefire 2.7.2 or higher to show skipped tests in test results.

Since:
2.1

Constructor Summary
IgnoreBrowserRule()
          Deprecated. use explicit browser/supplier, or get an instance of this rule using the page binder framework. Scheduled for removal in 3.0
IgnoreBrowserRule(Browser currentBrowser)
           
IgnoreBrowserRule(com.google.common.base.Supplier<Browser> currentBrowserSupplier)
           
 
Method Summary
 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
 

Constructor Detail

IgnoreBrowserRule

@Inject
public IgnoreBrowserRule(Browser currentBrowser)

IgnoreBrowserRule

public IgnoreBrowserRule(com.google.common.base.Supplier<Browser> currentBrowserSupplier)

IgnoreBrowserRule

@Deprecated
public IgnoreBrowserRule()
Deprecated. use explicit browser/supplier, or get an instance of this rule using the page binder framework. Scheduled for removal in 3.0

See Also:
ProductContextRunner
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


Copyright © 2014 Atlassian. All rights reserved.