docs: public static ExpectedCondition<WebDriver> frameToBeAvailableAndSwitchToIt(final By locator) {
      return new ExpectedCondition<WebDriver>() {
        @Override
        public WebDriver apply(WebDriver driver) {
          try {
            return driver.switchTo().frame(driver.findElement(locator));
          } catch (NoSuchFrameException e) {
            return null;
          }
        }
  
        @Override
        public String toString() {
          return "frame to be available: " + locator;
        }
      };
    }