public class Augmenter extends Object
RemoteWebDriver
based on the returned
Capabilities
of the driver.
Note: this class is still experimental. Use at your own risk.Constructor and Description |
---|
Augmenter() |
Modifier and Type | Method and Description |
---|---|
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) |
public void addDriverAugmentation(String capabilityName, AugmenterProvider handlerClass)
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.capabilityName
- The name of the capability to modelhandlerClass
- The provider of the interface and implementationpublic void addElementAugmentation(String capabilityName, AugmenterProvider handlerClass)
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.capabilityName
- The name of the capability to modelhandlerClass
- The provider of the interface and implementationpublic WebDriver augment(WebDriver driver)
RemoteWebDriver
.
The WebDriver that is returned may well be a dynamic proxy. You cannot rely on the concrete
implementing class to remain constant.driver
- The driver to enhancepublic WebElement augment(RemoteWebElement element)
RemoteWebElement
.
The WebElement that is returned may well be a dynamic proxy. You cannot rely on the concrete
implementing class to remain constant.element
- The driver to enhance.protected <X> X create(org.openqa.selenium.remote.Augmenter.CompoundHandler handler, X from)
Copyright © 2013. All rights reserved.