AddText

Provides functionality to add text to elements on a web page using various selectors.

Classes

AddText

Methods

(async) run(selector, text) → {Promise.<void>}

Adds text to an element using a unified selector string. Supports CSS selectors (default), and prefix-based strategies: 'id:myId', 'xpath://input', 'name:email', 'class:input-field'.
Parameters:
NameTypeDescription
selectorstringThe selector string. CSS by default, or use a prefix.
textstringThe text string to add.
Throws:
Throws an error if the element is not found.
Type
Error
Returns:
A promise that resolves when the text has been added.
Type: 
Promise.<void>