Class Augmenter


  • @Beta
    public class Augmenter
    extends java.lang.Object
    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

      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 a RemoteWebDriver.
      • 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 <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 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.