Package com.microsoft.playwright
Class Page.LocatorOptions
- java.lang.Object
-
- com.microsoft.playwright.Page.LocatorOptions
-
- Enclosing interface:
- Page
public static class Page.LocatorOptions extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description LocatorhasMatches elements containing an element that matches an inner locator.LocatorhasNotMatches elements that do not contain an element that matches an inner locator.java.lang.ObjecthasNotTextMatches elements that do not contain specified text somewhere inside, possibly in a child or a descendant element.java.lang.ObjecthasTextMatches elements containing specified text somewhere inside, possibly in a child or a descendant element.
-
Constructor Summary
Constructors Constructor Description LocatorOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Page.LocatorOptionssetHas(Locator has)Matches elements containing an element that matches an inner locator.Page.LocatorOptionssetHasNot(Locator hasNot)Matches elements that do not contain an element that matches an inner locator.Page.LocatorOptionssetHasNotText(java.lang.String hasNotText)Matches elements that do not contain specified text somewhere inside, possibly in a child or a descendant element.Page.LocatorOptionssetHasNotText(java.util.regex.Pattern hasNotText)Matches elements that do not contain specified text somewhere inside, possibly in a child or a descendant element.Page.LocatorOptionssetHasText(java.lang.String hasText)Matches elements containing specified text somewhere inside, possibly in a child or a descendant element.Page.LocatorOptionssetHasText(java.util.regex.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,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
public Locator 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
public java.lang.Object 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
public java.lang.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 Page.LocatorOptions setHas(Locator 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.
-
setHasNot
public Page.LocatorOptions setHasNot(Locator 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.
-
setHasNotText
public Page.LocatorOptions setHasNotText(java.lang.String 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.
-
setHasNotText
public Page.LocatorOptions setHasNotText(java.util.regex.Pattern 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.
-
setHasText
public Page.LocatorOptions setHasText(java.lang.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 Page.LocatorOptions setHasText(java.util.regex.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>.
-
-