code: @SuppressWarnings("unchecked")
      public static <T extends Element> List<T> elements(Class<T> type, Locator locator) {
          if (!type.isInterface()) {
              throw new IllegalArgumentException("Element type must be an interface, was: " + type);
          }
  
          InvocationHandler invocationHandler = new ElementListHandler(type, locator);
  
          return (List<T>) Proxy.newProxyInstance(Elements.class.getClassLoader(),
                  new Class[] { List.class, HasElementContext.class },
                  invocationHandler);
      }
docs: Looks up a automation-library-specific implementation for that element type, assuming an
  implementation is registered for that class.