Package org.openqa.selenium.remote
Class Augmenter
- java.lang.Object
-
- org.openqa.selenium.remote.Augmenter
-
@Beta public class Augmenter extends java.lang.Object
Enhance the interfaces implemented by an instance of theWebDriver
based on the returnedCapabilities
of the driver. Note: this class is still experimental. Use at your own risk.
-
-
Constructor Summary
Constructors Constructor Description Augmenter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <X> Augmenter
addDriverAugmentation(java.lang.String capabilityName, java.lang.Class<X> implementThis, java.util.function.BiFunction<org.openqa.selenium.Capabilities,ExecuteMethod,X> usingThis)
<X> Augmenter
addDriverAugmentation(java.util.function.Predicate<org.openqa.selenium.Capabilities> whenThisMatches, java.lang.Class<X> implementThis, java.util.function.BiFunction<org.openqa.selenium.Capabilities,ExecuteMethod,X> usingThis)
<X> Augmenter
addDriverAugmentation(AugmenterProvider<X> provider)
org.openqa.selenium.WebDriver
augment(org.openqa.selenium.WebDriver driver)
Enhance the interfaces implemented by this instance of WebDriver iff that instance is aRemoteWebDriver
.
-
-
-
Method Detail
-
addDriverAugmentation
public <X> Augmenter addDriverAugmentation(AugmenterProvider<X> provider)
-
addDriverAugmentation
public <X> Augmenter addDriverAugmentation(java.lang.String capabilityName, java.lang.Class<X> implementThis, java.util.function.BiFunction<org.openqa.selenium.Capabilities,ExecuteMethod,X> usingThis)
-
addDriverAugmentation
public <X> Augmenter addDriverAugmentation(java.util.function.Predicate<org.openqa.selenium.Capabilities> whenThisMatches, java.lang.Class<X> implementThis, java.util.function.BiFunction<org.openqa.selenium.Capabilities,ExecuteMethod,X> usingThis)
-
augment
public org.openqa.selenium.WebDriver augment(org.openqa.selenium.WebDriver driver)
Enhance the interfaces implemented by this instance of WebDriver iff 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.
-
-