Record Class PossibleSelectors

java.lang.Object
java.lang.Record
com.vaadin.copilot.testbenchgenerator.PossibleSelectors
Record Components:
className - class name of the element. Might be null
id - id of the element. Might be null.
label - label of the element. Might be null.
text - text of the element. Might be null.
firstElementInDocument - indicator that the element is the first element in the document with same tag
dataTestId - value of data-test-id if present. Null otherwise.
cssPath - CSS Path in the document. Note that using this might not produce correct output always.
selectedAttributePairByUser - Attribute selected by the user.

public record PossibleSelectors(String className, String id, String label, String text, Boolean firstElementInDocument, String dataTestId, String cssPath, PossibleSelectors.SelectedAttributePairByUser selectedAttributePairByUser) extends Record
This class represents a possible selector of a target element. The proper selector should be picked based on the priority e.g. selectedAttributePairByUser has higher priority than id because it has been set explicitly by user. The property should be as follows: selectedAttributePairByUser, label, text, firstElementInDocument, id, dataTestId, className, cssPath
  • Constructor Details

  • Method Details

    • equals

      public boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • hashCode

      public int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • className

      public String className()
      Returns the value of the className record component.
      Returns:
      the value of the className record component
    • id

      public String id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • label

      public String label()
      Returns the value of the label record component.
      Returns:
      the value of the label record component
    • text

      public String text()
      Returns the value of the text record component.
      Returns:
      the value of the text record component
    • firstElementInDocument

      public Boolean firstElementInDocument()
      Returns the value of the firstElementInDocument record component.
      Returns:
      the value of the firstElementInDocument record component
    • dataTestId

      public String dataTestId()
      Returns the value of the dataTestId record component.
      Returns:
      the value of the dataTestId record component
    • cssPath

      public String cssPath()
      Returns the value of the cssPath record component.
      Returns:
      the value of the cssPath record component
    • selectedAttributePairByUser

      public PossibleSelectors.SelectedAttributePairByUser selectedAttributePairByUser()
      Returns the value of the selectedAttributePairByUser record component.
      Returns:
      the value of the selectedAttributePairByUser record component