code: public static WebElement isElementPresentAndGetFirstOne(By element) {
  
          final WebDriver webDriver = Context.getDriver();
  
          webDriver.manage().timeouts().implicitlyWait(DriverFactory.IMPLICIT_WAIT * 2, TimeUnit.MICROSECONDS);
  
          final List<WebElement> foundElements = webDriver.findElements(element);
          final boolean exists = !foundElements.isEmpty();
  
          webDriver.manage().timeouts().implicitlyWait(DriverFactory.IMPLICIT_WAIT, TimeUnit.MICROSECONDS);
  
          if (exists) {
              return foundElements.get(0);
          } else {
              return null;
          }
  
      }
docs: Check if element present and get first one.
  
  @param element
  is {link org.openqa.selenium.By} find in page.
  @return first {link org.openqa.selenium.WebElement} finded present element.