Class JComponents

java.lang.Object
io.jmix.masquerade.JComponents

public class JComponents extends Object
Factory class for creating and wiring wrappers for Masquerade components.
  • Field Details

    • components

      protected static final Map<Class<?>,Function<org.openqa.selenium.By,?>> components
  • Method Details

    • wireComposite

      protected static <T extends Composite<?>> T wireComposite(Class<T> clazz)
      Wires and returns a composite wrapper for a web-element by class type.
      Type Parameters:
      T - type of the composite
      Parameters:
      clazz - class of the composite wrapper to wire
      Returns:
      composite wrapper for the web-element with wired fields
    • wireClassBy

      protected static <T> T wireClassBy(Class<T> clazz, org.openqa.selenium.By by)
      Wires and returns a component wrapper for a web-element by passed class type and By selector.
      Type Parameters:
      T - type of the component
      Parameters:
      clazz - class of the component wrapper to wire
      by - By selector by which the current web-element can be found
      Returns:
      component wrapper for the web-element
    • getTargetFieldValue

      protected static Object getTargetFieldValue(Class<?> clazz, Field field, org.openqa.selenium.By parentBy)
      Computes and returns a value to wire to a field in a web-element's wrapper.
      Parameters:
      clazz - origin class for field wiring
      field - field fir wiring
      parentBy - By selector by which the origin class can be found
      Returns:
      the value of the passed field
      See Also: