code: public static ExpectedCondition<WebElement> presenceOfNestedElementLocatedBy(
        final By locator,
        final By childLocator) {
      return new ExpectedCondition<WebElement>() {
  
        @Override
        public WebElement apply(WebDriver webDriver) {
          return webDriver.findElement(locator).findElement(childLocator);
        }
  
        @Override
        public String toString() {
          return String.format("visibility of element located by %s -> %s", locator, childLocator);
        }
      };
    }
docs: An expectation for checking child WebElement as a part of parent element to present
  
  @param locator     used to check parent element. For example table with locator
  By.xpath("//table")
  @param childLocator used to find child element. For example td By.xpath("./tr/td")
  @return subelement