UNPKG

nightwatch

Version:

Easy to use Node.js based End-to-End testing solution for browser based apps and websites, using the W3C WebDriver API.

18 lines (15 loc) 704 B
const ProtocolAction = require('./_base-action.js'); /** * Determine an element's size in pixels. The size will be returned as a JSON object with width and height properties. * * @param {string} webElementId The [Web Element ID](https://www.w3.org/TR/webdriver1/#dfn-web-elements) of the element to route the command to. * @param {function} callback Callback function which is called with the result value. * @api protocol.elementinternal * @internal */ module.exports = class Session extends ProtocolAction { command(webElementId, callback) { ProtocolAction.validateElementId(webElementId, 'elementIdSize'); return this.transportActions.getElementSize(webElementId, callback); } };