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 returned Capabilities
of the driver. Note: this class is
still experimental. Use at your own risk.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<X> Augmenter
addDriverAugmentation
(String capabilityName, Class<X> implementThis, BiFunction<Capabilities, ExecuteMethod, X> usingThis) <X> Augmenter
addDriverAugmentation
(Predicate<Capabilities> whenThisMatches, Class<X> implementThis, BiFunction<Capabilities, ExecuteMethod, X> usingThis) <X> Augmenter
addDriverAugmentation
(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.
-