org.testatoo.config.cartridge
Interface EvaluatorListener<T>

All Known Implementing Classes:
EvaluatorListenerAdapter

public interface EvaluatorListener<T>

This inteface is used a a callback that you can add when registering Selenium sessions or WebDrivers. It can be used to customize you selenium Session or WebDriver after it has started, or even to setup a custom Cartridge you want to test.

Example:


 protected void configure() {
     install(commonModule());
           [...]
     seleniumSessions()
         .register(provider)
         .add(new EvaluatorListenerAdapter<Selenium>() {
             public void afterStart(final Selenium session) {
                 // customize session
                 // setup here your custom cartridge
             }
         });
 }

We strongly recommend that classes which need to receive callback of object startup extend the adapter class EvaluatorListenerAdapter insead of implementing this interface.
This will allow us adding more events to the interface without impacting your code.


Method Summary
 void afterStart(T object)
          Callback method called after having started the implementation
 void afterStop(T object)
          Callback method called after having started the implementation
 void beforeStart(T object)
          Callback method called before starting the implementation
 void beforeStop(T object)
          Callback method called before starting the implementation
 

Method Detail

beforeStart

void beforeStart(T object)
Callback method called before starting the implementation

Parameters:
object - The implementation object (Selenium session, WebDriver, ...)

afterStart

void afterStart(T object)
Callback method called after having started the implementation

Parameters:
object - The implementation object (Selenium session, WebDriver, ...)

beforeStop

void beforeStop(T object)
Callback method called before starting the implementation

Parameters:
object - The implementation object (Selenium session, WebDriver, ...)

afterStop

void afterStop(T object)
Callback method called after having started the implementation

Parameters:
object - The implementation object (Selenium session, WebDriver, ...)


Copyright © 2008-2010 Ovea. All Rights Reserved.