Interface Refinable<Q>
- Type Parameters:
Q- the query type returned by each filter
- All Known Subinterfaces:
AccessibleNameFilters<Q>,LabelFilters<Q>,PlaceholderFilters<Q>,TextFilters<Q>
- All Known Implementing Classes:
ButtonQuery,ComponentQuery,DateTimePickerQuery,ElementQuery,FieldQuery,InputFieldQuery,SelectQuery,SideNavItemQuery,TextQuery,TooltipQuery
public interface Refinable<Q>
Base contract of the query filter mixins: a query that can be narrowed by
transforming its candidate locator.
-
Method Summary
Modifier and TypeMethodDescriptionrefine(UnaryOperator<com.microsoft.playwright.Locator> refinement) Return a query whose candidates are narrowed byrefinement.
-
Method Details
-
refine
Return a query whose candidates are narrowed byrefinement.Escape hatch for conditions no named filter covers; the function receives the current candidates and must return a locator over a subset of them (typically via
Locator.filter(Locator.FilterOptions)orLocator.and(Locator)). The query this is called on is left unchanged.- Parameters:
refinement- transformation applied to the candidate locator- Returns:
- a new query over the narrowed candidates
-