Record Class ElementSnapshot
java.lang.Object
java.lang.Record
com.shaft.capture.model.ElementSnapshot
- Record Components:
logicalElementId- stable logical element identifiertagName- element tag namerole- accessible roleaccessibleName- sanitized accessible namelabel- sanitized associated labelnormalizedAttributes- sanitized normalized attributeslocatorCandidates- deterministic locator evidencevisible- whether the element was visibleenabled- whether the element was enabledselected- whether the element was selected
public record ElementSnapshot(String logicalElementId, String tagName, String role, String accessibleName, String label, Map<String,String> normalizedAttributes, List<LocatorCandidate> locatorCandidates, boolean visible, boolean enabled, boolean selected)
extends Record
Sanitized element evidence at the time of an action.
-
Constructor Summary
ConstructorsConstructorDescriptionElementSnapshot(String logicalElementId, String tagName, String role, String accessibleName, String label, Map<String, String> normalizedAttributes, List<LocatorCandidate> locatorCandidates, boolean visible, boolean enabled, boolean selected) Creates an immutable element snapshot with candidates in best-first order. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theaccessibleNamerecord component.booleanenabled()Returns the value of theenabledrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.label()Returns the value of thelabelrecord component.Returns the value of thelocatorCandidatesrecord component.Returns the value of thelogicalElementIdrecord component.Returns the value of thenormalizedAttributesrecord component.role()Returns the value of therolerecord component.booleanselected()Returns the value of theselectedrecord component.tagName()Returns the value of thetagNamerecord component.final StringtoString()Returns a string representation of this record class.booleanvisible()Returns the value of thevisiblerecord component.
-
Constructor Details
-
ElementSnapshot
public ElementSnapshot(String logicalElementId, String tagName, String role, String accessibleName, String label, Map<String, String> normalizedAttributes, List<LocatorCandidate> locatorCandidates, boolean visible, boolean enabled, boolean selected) Creates an immutable element snapshot with candidates in best-first order.
-
-
Method Details
-
toString
-
hashCode
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
logicalElementId
Returns the value of thelogicalElementIdrecord component.- Returns:
- the value of the
logicalElementIdrecord component
-
tagName
-
role
-
accessibleName
Returns the value of theaccessibleNamerecord component.- Returns:
- the value of the
accessibleNamerecord component
-
label
-
normalizedAttributes
Returns the value of thenormalizedAttributesrecord component.- Returns:
- the value of the
normalizedAttributesrecord component
-
locatorCandidates
Returns the value of thelocatorCandidatesrecord component.- Returns:
- the value of the
locatorCandidatesrecord component
-
visible
-
enabled
-
selected
-