code: public void clazz(String expectedClass, double seconds) {
          double end = System.currentTimeMillis() + (seconds * 1000);
          try {
              elementPresent(seconds);
              while (!(expectedClass == null ? element.get().attribute(CLASS) == null : expectedClass.equals(element.get().attribute(CLASS))) && System.currentTimeMillis() < end) ;
              double timeTook = Math.min((seconds * 1000) - (end - System.currentTimeMillis()), seconds * 1000) / 1000;
              checkClazz(expectedClass, seconds, timeTook);
          } catch (TimeoutException e) {
              checkClazz(expectedClass, seconds, seconds);
          }
      }
docs: Waits for the element's class equals the provided expected class. If
  the element isn't present, this will constitute a failure, same as a
  mismatch. The provided wait time will be used and if the element doesn't
  have the desired match count at that time, it will fail, and log
  the issue with a screenshot for traceability and added debugging support.
  
  @param expectedClass - the full expected class value
  @param seconds       - how many seconds to wait for