Package org.openqa.selenium.remote
Class Augmenter
java.lang.Object
org.openqa.selenium.remote.Augmenter
Enhance the interfaces implemented by an instance of the
WebDriver based on the returnedCapabilities of the driver. Note: this class is still experimental. Use at your own risk.Constructor Summary
ConstructorsMethod Summary
Modifier and TypeMethodDescription<X> AugmenteraddDriverAugmentation(String capabilityName,Class<X> implementThis,BiFunction<Capabilities, ExecuteMethod, X> usingThis) <X> AugmenteraddDriverAugmentation(Predicate<Capabilities> whenThisMatches,Class<X> implementThis,BiFunction<Capabilities, ExecuteMethod, X> usingThis) <X> AugmenteraddDriverAugmentation(AugmenterProvider<X> provider) Enhance the interfaces implemented by this instance of WebDriver if that instance is aRemoteWebDriver.
Constructor Details
Augmenter
public Augmenter()
Method Details
addDriverAugmentation
addDriverAugmentation
public <X> Augmenter addDriverAugmentation(String capabilityName,Class<X> implementThis,BiFunction<Capabilities, ExecuteMethod, X> usingThis) addDriverAugmentation
public <X> Augmenter addDriverAugmentation(Predicate<Capabilities> whenThisMatches,Class<X> implementThis,BiFunction<Capabilities, ExecuteMethod, X> usingThis) augment
Enhance the interfaces implemented by this instance of WebDriver if that instance is aRemoteWebDriver. 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.