Classes
Methods
(async) run(selector, optionsopt) → {Promise.<void>}
Clicks on an element using a unified selector string. Supports CSS selectors (default), and prefix-based strategies: 'id:myId', 'xpath://button', 'text:Submit', 'link:Click here', 'name:email', 'class:btn'.
Parameters:
| Name | Type | Attributes | Description | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
selector | string | The selector string. CSS by default, or use a prefix like 'id:', 'xpath:', 'text:', 'link:', 'name:', 'class:'. | |||||||||||
options | Object | <optional> | Options for the click action.Properties
|
Throws:
- Throws an error if the element is not found.
- Type
- Error
Returns:
A promise that resolves when the click action is performed.
- Type:
- Promise.<void>