code: public static ExpectedCondition<List<WebElement>> visibilityOfFirstElements(final By locator) {
          return new ExpectedCondition<List<WebElement>>() {
              @Override
              public List<WebElement> apply(final WebDriver driver) {
                  return getFirstVisibleWebElements(driver, null, locator);
              }
  
              @Override
              public String toString() {
                  return String.format("visibility of element located by %s", locator);
              }
          };
      }
docs: Expected condition to look for elements in frames that will return as soon as elements are found in any frame
  
  @param locator
  @return