.submit() Suggest edits
Since: 3.0.0Submits the form containing this element (or this element if it is itself a FORM element). his command is a no-op if the element is not contained in a form.
For more info on working with DOM elements in Nightwatch, refer to the Finding & interacting with DOM Elements guide page.
This command has been deprecated and is not available when using W3C Webdriver clients (such as GeckoDriver). It's only available when using the Selenium JSONWire Protocol.
Usage
browser.element(selector).submit()
Example
export default {
demoTest(browser: NightwatchAPI): void {
browser.element('form.login').submit();
},
async demoTestAsync(browser: NightwatchAPI): Promise<void> {
await browser.element('form.login').submit();
}
}
Returns
Type | description |
---|---|
ScopedWebElement |