org.openqa.selenium.remote
Class Augmenter

java.lang.Object
  extended by org.openqa.selenium.remote.Augmenter

public class Augmenter
extends Object

Enhance the interfaces implemented by an instance of the RemoteWebDriver based on the returned Capabilities of the driver. Note: this class is still experimental. Use at your own risk.


Constructor Summary
Augmenter()
           
 
Method Summary
 void addDriverAugmentation(String capabilityName, AugmenterProvider handlerClass)
          Add a mapping between a capability name and the implementation of the interface that name represents for instances of WebDriver.
 void addElementAugmentation(String capabilityName, AugmenterProvider handlerClass)
          Add a mapping between a capability name and the implementation of the interface that name represents for instances of WebElement.
 WebElement augment(RemoteWebElement element)
          Enhance the interfaces implemented by this instance of WebElement iff that instance is a RemoteWebElement.
 WebDriver augment(WebDriver driver)
          Enhance the interfaces implemented by this instance of WebDriver iff that instance is a RemoteWebDriver.
protected
<X> X
create(org.openqa.selenium.remote.Augmenter.CompoundHandler handler, X from)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Augmenter

public Augmenter()
Method Detail

addDriverAugmentation

public void addDriverAugmentation(String capabilityName,
                                  AugmenterProvider handlerClass)
Add a mapping between a capability name and the implementation of the interface that name represents for instances of WebDriver. For example (@link CapabilityType#TAKES_SCREENSHOT} is represents the interface TakesScreenshot, which is implemented via the AddTakesScreenshot provider. Note: This method is still experimental. Use at your own risk.

Parameters:
capabilityName - The name of the capability to model
handlerClass - The provider of the interface and implementation

addElementAugmentation

public void addElementAugmentation(String capabilityName,
                                   AugmenterProvider handlerClass)
Add a mapping between a capability name and the implementation of the interface that name represents for instances of WebElement. For example (@link CapabilityType#TAKES_SCREENSHOT} is represents the interface FindsByCssSelector, which is implemented via the AddFindsByCss provider. Note: This method is still experimental. Use at your own risk.

Parameters:
capabilityName - The name of the capability to model
handlerClass - The provider of the interface and implementation

augment

public WebDriver augment(WebDriver driver)
Enhance the interfaces implemented by this instance of WebDriver iff that instance is a RemoteWebDriver. The WebDriver that is returned may well be a dynamic proxy. You cannot rely on the concrete implementing class to remain constant.

Parameters:
driver - The driver to enhance
Returns:
A class implementing the described interfaces.

augment

public WebElement augment(RemoteWebElement element)
Enhance the interfaces implemented by this instance of WebElement iff that instance is a RemoteWebElement. The WebElement that is returned may well be a dynamic proxy. You cannot rely on the concrete implementing class to remain constant.

Parameters:
element - The driver to enhance.
Returns:
A class implementing the described interfaces.

create

protected <X> X create(org.openqa.selenium.remote.Augmenter.CompoundHandler handler,
                       X from)


Copyright © 2012. All Rights Reserved.