Classes
Methods
(async) atCursor() → {Promise.<void>}
Clicks and holds at the current cursor position.
Throws:
- Throws an error if the action cannot be performed.
- Type
- Error
Returns:
A promise that resolves when the action is performed.
- Type:
- Promise.<void>
(async) atPosition(xPos, yPos) → {Promise.<void>}
Clicks and holds at the specified screen coordinates.
Parameters:
Name | Type | Description |
---|---|---|
xPos | number | The x-coordinate on the screen. |
yPos | number | The y-coordinate on the screen. |
Throws:
- Throws an error if the action cannot be performed.
- Type
- Error
Returns:
A promise that resolves when the action is performed.
- Type:
- Promise.<void>
(async) bySelector(selector) → {Promise.<void>}
Clicks and holds on an element that matches a given CSS selector.
Parameters:
Name | Type | Description |
---|---|---|
selector | string | The CSS selector of the element to interact with. |
Throws:
- Throws an error if the element is not found.
- Type
- Error
Returns:
A promise that resolves when the action is performed.
- Type:
- Promise.<void>
(async) byXpath(xpath) → {Promise.<void>}
Clicks and holds on an element that matches a given XPath selector.
Parameters:
Name | Type | Description |
---|---|---|
xpath | string | The XPath selector of the element to interact with. |
Throws:
- Throws an error if the element is not found.
- Type
- Error
Returns:
A promise that resolves when the action is performed.
- Type:
- Promise.<void>
(async) releaseAtPosition(xPos, yPos) → {Promise.<void>}
Releases the mouse button at the specified screen coordinates.
Parameters:
Name | Type | Description |
---|---|---|
xPos | number | The x-coordinate on the screen. |
yPos | number | The y-coordinate on the screen. |
Throws:
- Throws an error if the action cannot be performed.
- Type
- Error
Returns:
A promise that resolves when the action is performed.
- Type:
- Promise.<void>
(async) releaseAtSelector(selector) → {Promise.<void>}
Releases the mouse button on an element matching the specified CSS selector.
Parameters:
Name | Type | Description |
---|---|---|
selector | string | The CSS selector of the element to release the mouse on. |
Throws:
- Throws an error if the action cannot be performed.
- Type
- Error
Returns:
A promise that resolves when the action is performed.
- Type:
- Promise.<void>
(async) releaseAtXpath(xpath) → {Promise.<void>}
Releases the mouse button on an element matching the specified XPath.
Parameters:
Name | Type | Description |
---|---|---|
xpath | string | The XPath selector of the element to release the mouse on. |
Throws:
- Throws an error if the action cannot be performed.
- Type
- Error
Returns:
A promise that resolves when the action is performed.
- Type:
- Promise.<void>