The page says
Passes when the page text, or one element's text, contains some text or matches a regular expression.
The page says contains
Details #
Reads the visible text of the page (or of selector). Give contains (any case) or regex.
Parameters #
| Parameter | Type | Required | Values | What it does |
|---|---|---|---|---|
contains | text | Text to look for. | ||
html | text | |||
impersonate | one of | auto chrome safari none | ||
regex | text | A regular expression. | ||
sample | any value | |||
selector | text | Only this element's text. | ||
signIn | text | |||
tab | any value | Which tab. | ||
url | text | , html, via, signIn, impersonate: Check a page nobody has open: url is fetched the way a browser would (signed in with signIn), so onlyIf can ask "does the product page say In stock" without a tab. | ||
via | one of | fetch tab |
Examples #
Stop if the page says out of stock
Do
- If the page says “out of stock”
- Stop the macro
- Else
Gotchas #
Hidden text is not part of the visible text.