SingleClick

Provides functionality to perform a single click action on elements or at specific positions in a web page. Uses Seleniums Action API.

Classes

SingleClick

Methods

(async) atCursor(optionsopt) → {Promise.<void>}

Performs a single mouse click at the current cursor position.
Parameters:
NameTypeAttributesDescription
optionsObject<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) byLinkText(text) → {Promise.<void>}

Clicks on a link whose visible text matches the given string.
Parameters:
NameTypeDescription
textstringThe 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:
NameTypeDescription
textstringThe 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:
NameTypeDescription
textstringThe 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 checl.
Parameters:
NameTypeDescription
textstringThe 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:
NameTypeAttributesDescription
selectorstringThe CSS selector of the element to click.
optionsObject<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:
NameTypeDescription
selectorstringThe 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:
NameTypeAttributesDescription
xpathstringThe XPath selector of the element to click.
optionsObject<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:
NameTypeDescription
xpathstringThe 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>