Package com.microsoft.playwright
Class Locator.LocatorOptions
- java.lang.Object
-
- com.microsoft.playwright.Locator.LocatorOptions
-
-
Constructor Summary
Constructors Constructor Description LocatorOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Locator.LocatorOptions
setHas(Locator has)
Matches elements containing an element that matches an inner locator.Locator.LocatorOptions
setHasText(String hasText)
Matches elements containing specified text somewhere inside, possibly in a child or a descendant element.Locator.LocatorOptions
setHasText(Pattern hasText)
Matches elements containing specified text somewhere inside, possibly in a child or a descendant element.
-
-
-
Field Detail
-
has
public Locator has
Matches elements containing an element that matches an inner locator. Inner locator is queried against the outer one. For example,article
that hastext=Playwright
matches<article><div>Playwright</div></article>
.Note that outer and inner locators must belong to the same frame. Inner locator must not contain
FrameLocator
s.
-
hasText
public Object 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>
.
-
-
Method Detail
-
setHas
public Locator.LocatorOptions setHas(Locator has)
Matches elements containing an element that matches an inner locator. Inner locator is queried against the outer one. For example,article
that hastext=Playwright
matches<article><div>Playwright</div></article>
.Note that outer and inner locators must belong to the same frame. Inner locator must not contain
FrameLocator
s.
-
setHasText
public Locator.LocatorOptions setHasText(String 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>
.
-
setHasText
public Locator.LocatorOptions setHasText(Pattern 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>
.
-
-