com.atlassian.webdriver.testing.rule
Class SessionCleanupRule

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

public class SessionCleanupRule
extends FailsafeExternalResource

A simple rule to clear the browsers session at the end of a test. This removes the need to have an @After method that logs the user out of the TestedProduct.

This simply clears the cookies from the browser making it much quicker then actually going through the products logout process.

Since:
2.1.0

Constructor Summary
SessionCleanupRule()
           
SessionCleanupRule(com.google.common.base.Supplier<? extends org.openqa.selenium.WebDriver> webDriver)
           
SessionCleanupRule(org.openqa.selenium.WebDriver webDriver)
           
 
Method Summary
protected  void after()
           
protected  void before()
           
 
Methods inherited from class com.atlassian.webdriver.testing.rule.FailsafeExternalResource
apply
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SessionCleanupRule

public SessionCleanupRule(com.google.common.base.Supplier<? extends org.openqa.selenium.WebDriver> webDriver)

SessionCleanupRule

@Inject
public SessionCleanupRule(org.openqa.selenium.WebDriver webDriver)

SessionCleanupRule

public SessionCleanupRule()
Method Detail

before

protected void before()
               throws Throwable
Overrides:
before in class org.junit.rules.ExternalResource
Throws:
Throwable

after

protected void after()
Overrides:
after in class org.junit.rules.ExternalResource


Copyright © 2014 Atlassian. All rights reserved.