code: public static Condition attribute(final String attributeName, final String expectedAttributeValue) {
      return new Condition("attribute") {
        @Override
        public boolean apply(Driver driver, WebElement element) {
          return expectedAttributeValue.equals(getAttributeValue(element, attributeName));
        }
  
        @Override
        public String toString() {
          return name + " " + attributeName + '=' + expectedAttributeValue;
        }
      };
    }
docs: <p>Sample: <code>$("#mydiv").shouldHave(attribute("fileId", "12345"));</code></p>
  
  @param attributeName          name of attribute
  @param expectedAttributeValue expected value of attribute