Skip to main content
Version: 0.20.3

text

production

Filters for an UI element 'text'.

Takes an optional parameter to filter for a specific text. See the examples below.

See also the filters withTextRegex() and withExactText()

Examples:

await aui.click().text().exec();
await aui.click().text('Username').exec();

// Matching with an exact text
await aui.click().text().withExactText('Username').exec();

// Matching with a regex
await aui.click().text().withTextRegex('\b[Ss]\w+').exec();
  • @param {string} [text] - A text to be matched.