.setProperty() Suggest edits
Since: 3.0.0Set the value of a specified DOM property for the given element.
Usage
browser.element(selector).setProperty(name, value)
Example
export default {
demoTest(browser: NightwatchAPI): void {
browser.element('#login').setProperty('title', 'Hello');
},
async demoTestAsync(browser: NightwatchAPI): Promise<void> {
await browser.element('#login').setProperty('title', 'Hello');
}
}
Parameters
Name | Type | description |
---|---|---|
name |
string | The property name to set. |
value |
The property value name to set. |
Returns
Type | description |
---|---|
ScopedWebElement |