code: public WebDriver augment(WebDriver driver) {
      RemoteWebDriver remoteDriver = extractRemoteWebDriver(driver);
      if (remoteDriver == null) {
        return driver;
      }
      return create(remoteDriver, driverAugmentors, driver);
    }
docs: Enhance the interfaces implemented by this instance of WebDriver iff that instance is a
  {@link org.openqa.selenium.remote.RemoteWebDriver}.
  
  The WebDriver that is returned may well be a dynamic proxy. You cannot rely on the concrete
  implementing class to remain constant.
  
  @param driver The driver to enhance
  @return A class implementing the described interfaces.