forked from enviPath/enviPy
Current Dev State
This commit is contained in:
27
static/js/ketcher2/node_modules/webdriverio/lib/protocol/elementIdRect.js
generated
vendored
Normal file
27
static/js/ketcher2/node_modules/webdriverio/lib/protocol/elementIdRect.js
generated
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
/**
|
||||
*
|
||||
* The Get Element Rect command returns the dimensions and coordinates of the given web element.
|
||||
* The returned value is a dictionary with `x`. `y`, `width` and `height` properties.
|
||||
*
|
||||
* Note: this command was recently added to the official Webdriver protocol and might not be
|
||||
* working with current Selenium driver.
|
||||
*
|
||||
* @param {String} ID ID of a WebElement JSON object to route the command to
|
||||
*
|
||||
* @see https://w3c.github.io/webdriver/webdriver-spec.html#get-element-rect
|
||||
* @type protocol
|
||||
*
|
||||
*/
|
||||
|
||||
import { ProtocolError } from '../utils/ErrorHandler'
|
||||
|
||||
export default function elementIdRect (id) {
|
||||
if (typeof id !== 'string' && typeof id !== 'number') {
|
||||
throw new ProtocolError('number or type of arguments don\'t agree with elementIdRect protocol command')
|
||||
}
|
||||
|
||||
return this.requestHandler.create({
|
||||
path: `/session/:sessionId/element/${id}/rect`,
|
||||
method: 'GET'
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user