Record Class PossibleSelectors
java.lang.Object
java.lang.Record
com.vaadin.copilot.testbenchgenerator.PossibleSelectors
- Record Components:
className- class name of the element. Might be nullid- 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 tagdataTestId- value ofdata-test-idif 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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordExplicitly selected attribute by the user. -
Constructor Summary
ConstructorsConstructorDescriptionPossibleSelectors(String className, String id, String label, String text, Boolean firstElementInDocument, String dataTestId, String cssPath, PossibleSelectors.SelectedAttributePairByUser selectedAttributePairByUser) Creates an instance of aPossibleSelectorsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theclassNamerecord component.cssPath()Returns the value of thecssPathrecord component.Returns the value of thedataTestIdrecord component.booleanIndicates whether some other object is "equal to" this one.Returns the value of thefirstElementInDocumentrecord component.inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.label()Returns the value of thelabelrecord component.Returns the value of theselectedAttributePairByUserrecord component.text()Returns the value of thetextrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PossibleSelectors
public PossibleSelectors(String className, String id, String label, String text, Boolean firstElementInDocument, String dataTestId, String cssPath, PossibleSelectors.SelectedAttributePairByUser selectedAttributePairByUser) Creates an instance of aPossibleSelectorsrecord class.- Parameters:
className- the value for theclassNamerecord componentid- the value for theidrecord componentlabel- the value for thelabelrecord componenttext- the value for thetextrecord componentfirstElementInDocument- the value for thefirstElementInDocumentrecord componentdataTestId- the value for thedataTestIdrecord componentcssPath- the value for thecssPathrecord componentselectedAttributePairByUser- the value for theselectedAttributePairByUserrecord component
-
-
Method Details
-
equals
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 withObjects::equals(Object,Object). -
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. -
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. -
className
Returns the value of theclassNamerecord component.- Returns:
- the value of the
classNamerecord component
-
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
label
Returns the value of thelabelrecord component.- Returns:
- the value of the
labelrecord component
-
text
Returns the value of thetextrecord component.- Returns:
- the value of the
textrecord component
-
firstElementInDocument
Returns the value of thefirstElementInDocumentrecord component.- Returns:
- the value of the
firstElementInDocumentrecord component
-
dataTestId
Returns the value of thedataTestIdrecord component.- Returns:
- the value of the
dataTestIdrecord component
-
cssPath
Returns the value of thecssPathrecord component.- Returns:
- the value of the
cssPathrecord component
-
selectedAttributePairByUser
Returns the value of theselectedAttributePairByUserrecord component.- Returns:
- the value of the
selectedAttributePairByUserrecord component
-