Package com.microsoft.playwright
Class Locator.FilterOptions
java.lang.Object
com.microsoft.playwright.Locator.FilterOptions
- Enclosing interface:
Locator
-
Field Summary
FieldsModifier and TypeFieldDescriptionMatches elements containing an element that matches an inner locator.Matches elements that do not contain an element that matches an inner locator.Matches elements that do not contain specified text somewhere inside, possibly in a child or a descendant element.Matches elements containing specified text somewhere inside, possibly in a child or a descendant element. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionMatches elements containing an element that matches an inner locator.Matches elements that do not contain an element that matches an inner locator.setHasNotText(String hasNotText) Matches elements that do not contain specified text somewhere inside, possibly in a child or a descendant element.setHasNotText(Pattern hasNotText) Matches elements that do not contain specified text somewhere inside, possibly in a child or a descendant element.setHasText(String hasText) Matches elements containing specified text somewhere inside, possibly in a child or a descendant element.setHasText(Pattern hasText) Matches elements containing specified text somewhere inside, possibly in a child or a descendant element.
-
Field Details
-
has
Matches elements containing an element that matches an inner locator. Inner locator is queried against the outer one. For example,articlethat hastext=Playwrightmatches<article><div>Playwright</div></article>.Note that outer and inner locators must belong to the same frame. Inner locator must not contain
FrameLocators. -
hasNot
Matches elements that do not contain an element that matches an inner locator. Inner locator is queried against the outer one. For example,articlethat does not havedivmatches<article><span>Playwright</span></article>.Note that outer and inner locators must belong to the same frame. Inner locator must not contain
FrameLocators. -
hasNotText
Matches elements that do not contain specified text somewhere inside, possibly in a child or a descendant element. When passed a [string], matching is case-insensitive and searches for a substring. -
hasText
Matches elements containing specified text somewhere inside, possibly in a child or a descendant element. When passed a [string], matching is case-insensitive and searches for a substring. For example,"Playwright"matches<article><div>Playwright</div></article>.
-
-
Constructor Details
-
FilterOptions
public FilterOptions()
-
-
Method Details
-
setHas
Matches elements containing an element that matches an inner locator. Inner locator is queried against the outer one. For example,articlethat hastext=Playwrightmatches<article><div>Playwright</div></article>.Note that outer and inner locators must belong to the same frame. Inner locator must not contain
FrameLocators. -
setHasNot
Matches elements that do not contain an element that matches an inner locator. Inner locator is queried against the outer one. For example,articlethat does not havedivmatches<article><span>Playwright</span></article>.Note that outer and inner locators must belong to the same frame. Inner locator must not contain
FrameLocators. -
setHasNotText
Matches elements that do not contain specified text somewhere inside, possibly in a child or a descendant element. When passed a [string], matching is case-insensitive and searches for a substring. -
setHasNotText
Matches elements that do not contain specified text somewhere inside, possibly in a child or a descendant element. When passed a [string], matching is case-insensitive and searches for a substring. -
setHasText
Matches elements containing specified text somewhere inside, possibly in a child or a descendant element. When passed a [string], matching is case-insensitive and searches for a substring. For example,"Playwright"matches<article><div>Playwright</div></article>. -
setHasText
Matches elements containing specified text somewhere inside, possibly in a child or a descendant element. When passed a [string], matching is case-insensitive and searches for a substring. For example,"Playwright"matches<article><div>Playwright</div></article>.
-