Classes
Methods
(async) atCursor(optionsopt) → {Promise.<void>}
Performs a single mouse click at the current cursor position.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
options | Object | <optional> | Additional options for the click action. |
Throws:
- Throws an error if the single click action cannot be performed.
- Type
- Error
Returns:
A promise that resolves when the single click occurs.
- Type:
- Promise.<void>
(async) atCursorAndWait() → {Promise.<void>}
Performs a single mouse click at the current cursor position and waits on the page complete check.
Throws:
- Throws an error if the single click action cannot be performed.
- Type
- Error
Returns:
A promise that resolves when the single click occurs.
- Type:
- Promise.<void>
(async) byId(id) → {Promise.<void>}
Clicks on a element with a specific id.
Parameters:
Name | Type | Description |
---|---|---|
id | string | The id of the link to click. |
Throws:
- Throws an error if the id is not found.
- Type
- Error
Returns:
A promise that resolves when the click action is performed.
- Type:
- Promise.<void>
(async) byIdAndWait(id) → {Promise.<void>}
Clicks on a element with a specific id and wait on the page complete check
Parameters:
Name | Type | Description |
---|---|---|
id | string | The id of the link to click. |
Throws:
- Throws an error if the id is not found.
- Type
- Error
Returns:
A promise that resolves when the page has completed.
- Type:
- Promise.<void>
(async) byLinkText(text) → {Promise.<void>}
Clicks on a link whose visible text matches the given string.
Parameters:
Name | Type | Description |
---|---|---|
text | string | The visible text of the link to click. |
Throws:
- Throws an error if the link is not found.
- Type
- Error
Returns:
A promise that resolves when the click action is performed.
- Type:
- Promise.<void>
(async) byLinkTextAndWait(text) → {Promise.<void>}
Clicks on a link whose visible text matches the given string and waits on the opage complete check.
Parameters:
Name | Type | Description |
---|---|---|
text | string | The visible text of the link to click. |
Throws:
- Throws an error if the link is not found.
- Type
- Error
Returns:
A promise that resolves when the click action is performed.
- Type:
- Promise.<void>
(async) byPartialLinkText(text) → {Promise.<void>}
Clicks on a link whose visible text contains the given substring.
Parameters:
Name | Type | Description |
---|---|---|
text | string | The substring of the visible text of the link to click. |
Throws:
- Throws an error if the link is not found.
- Type
- Error
Returns:
A promise that resolves when the click action is performed.
- Type:
- Promise.<void>
(async) byPartialLinkTextAndWait(text) → {Promise.<void>}
Clicks on a link whose visible text contains the given substring and waits on the page complete check.
Parameters:
Name | Type | Description |
---|---|---|
text | string | The substring of the visible text of the link to click. |
Throws:
- Throws an error if the link is not found.
- Type
- Error
Returns:
A promise that resolves when the click action is performed.
- Type:
- Promise.<void>
(async) bySelector(selector, optionsopt) → {Promise.<void>}
Performs a single mouse click on an element matching a given CSS selector.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
selector | string | The CSS selector of the element to click. | |
options | Object | <optional> | Additional options for the click action. |
Throws:
- Throws an error if the element is not found.
- Type
- Error
Returns:
A promise that resolves when the single click action is performed.
- Type:
- Promise.<void>
(async) bySelectorAndWait(selector) → {Promise.<void>}
Performs a single mouse click on an element matching a given CSS selector and waits on the page complete check.
Parameters:
Name | Type | Description |
---|---|---|
selector | string | The CSS selector of the element to click. |
Throws:
- Throws an error if the element is not found.
- Type
- Error
Returns:
A promise that resolves when the single click action is performed.
- Type:
- Promise.<void>
(async) byXpath(xpath, optionsopt) → {Promise.<void>}
Performs a single mouse click on an element matching a given XPath selector.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
xpath | string | The XPath selector of the element to click. | |
options | Object | <optional> | Additional options for the click action. |
Throws:
- Throws an error if the element is not found.
- Type
- Error
Returns:
A promise that resolves when the single click action is performed.
- Type:
- Promise.<void>
(async) byXpathAndWait(xpath) → {Promise.<void>}
Performs a single mouse click on an element matching a given XPath selector and wait for page complete check.
Parameters:
Name | Type | Description |
---|---|---|
xpath | string | The XPath selector of the element to click. |
Throws:
- Throws an error if the element is not found.
- Type
- Error
Returns:
A promise that resolves when the single click action is performed.
- Type:
- Promise.<void>