forked from enviPath/enviPy
Current Dev State
This commit is contained in:
28
static/js/ketcher2/node_modules/webdriverio/lib/protocol/submit.js
generated
vendored
Normal file
28
static/js/ketcher2/node_modules/webdriverio/lib/protocol/submit.js
generated
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
/**
|
||||
*
|
||||
* Submit a FORM element. The submit command may also be applied to any element
|
||||
* that is a descendant of a FORM element. (Not part of the official Webdriver specification).
|
||||
*
|
||||
* @param {String} ID ID of a `<form />` WebElement JSON object to route the command to
|
||||
*
|
||||
* @see https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidelementidsubmit
|
||||
* @type protocol
|
||||
*
|
||||
*/
|
||||
|
||||
import { ProtocolError } from '../utils/ErrorHandler'
|
||||
import depcrecate from '../helpers/depcrecationWarning'
|
||||
|
||||
export default function submit (id) {
|
||||
if (typeof id !== 'string' && typeof id !== 'number') {
|
||||
throw new ProtocolError(
|
||||
'number or type of arguments don\'t agree with submit protocol command'
|
||||
)
|
||||
}
|
||||
|
||||
depcrecate('submit')
|
||||
return this.requestHandler.create({
|
||||
path: `/session/:sessionId/element/${id}/submit`,
|
||||
method: 'POST'
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user