Classes
Methods
(async) innerHtml(html, selector) → {Promise.<void>}
Sets the innerHTML of an element using a CSS selector.
Parameters:
Name | Type | Description |
---|---|---|
html | string | The HTML string to set as innerHTML. |
selector | string | The CSS selector of the element. |
Throws:
- Throws an error if the element is not found.
- Type
- Error
Returns:
A promise that resolves when the innerHTML is set.
- Type:
- Promise.<void>
(async) innerHtmlById(html, id) → {Promise.<void>}
Sets the innerHTML of an element using its ID.
Parameters:
Name | Type | Description |
---|---|---|
html | string | The HTML string to set as innerHTML. |
id | string | The ID of the element. |
Throws:
- Throws an error if the element is not found.
- Type
- Error
Returns:
A promise that resolves when the innerHTML is set.
- Type:
- Promise.<void>
(async) innerText(text, selector) → {Promise.<void>}
Sets the innerText of an element using a CSS selector.
Parameters:
Name | Type | Description |
---|---|---|
text | string | The text to set as innerText. |
selector | string | The CSS selector of the element. |
Throws:
- Throws an error if the element is not found.
- Type
- Error
Returns:
A promise that resolves when the innerText is set.
- Type:
- Promise.<void>
(async) innerTextById(text, id) → {Promise.<void>}
Sets the innerText of an element using its ID.
Parameters:
Name | Type | Description |
---|---|---|
text | string | The text to set as innerText. |
id | string | The ID of the element. |
Throws:
- Throws an error if the element is not found.
- Type
- Error
Returns:
A promise that resolves when the innerText is set.
- Type:
- Promise.<void>
(async) value(value, selector) → {Promise.<void>}
Sets the value of an element using a CSS selector.
Parameters:
Name | Type | Description |
---|---|---|
value | string | The value to set on the element. |
selector | string | The CSS selector of the element. |
Throws:
- Throws an error if the element is not found.
- Type
- Error
Returns:
A promise that resolves when the value is set.
- Type:
- Promise.<void>
(async) valueById(value, id) → {Promise.<void>}
Sets the value of an element using its ID.
Parameters:
Name | Type | Description |
---|---|---|
value | string | The value to set on the element. |
id | string | The ID of the element. |
Throws:
- Throws an error if the element is not found.
- Type
- Error
Returns:
A promise that resolves when the value is set.
- Type:
- Promise.<void>