Annotation Interface LocateBy
Annotation that is used to specify how to locate an element.
This annotation can be applied to fields to specify the strategy to locate the element.
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptioncom.microsoft.playwright.options.AriaRoleReturns the AriaRole value specified in theLocateByannotation.Returns the 'How' strategy used to locate an element.Returns the pattern used to locate an element.Returns the value of the "value" parameter of the annotation.
-
Element Details
-
how
How howReturns the 'How' strategy used to locate an element.- Returns:
- The 'How' strategy used to locate an element.
- Default:
UNSET
-
value
String valueReturns the value of the "value" parameter of the annotation.- Returns:
- the value of the "value" parameter
- Default:
""
-
pattern
String patternReturns the pattern used to locate an element.- Returns:
- The pattern used to locate an element.
- Default:
""
-
ariaRole
com.microsoft.playwright.options.AriaRole ariaRoleReturns the AriaRole value specified in theLocateByannotation. AriaRole is an enumeration that represents the ARIA roles defined in the W3C ARIA specification. It is used to locate an element based on its role attribute.- Returns:
- The AriaRole value specified in the
LocateByannotation. If not specified, returns AriaRole.NONE. - See Also:
- Default:
NONE
-