getSize

Get the width and height for an DOM-element.

Usage#
$(selector).getSize(prop)
Parameters#
NameTypeDetails
prop
optional
Stringsize to receive [optional] ("width" or "height")
Example#
getSize.js
it('should demonstrate the getSize command', () => {
browser.url('http://github.com')
const logo = $('.octicon-mark-github')
const size = logo.getSize()
console.log(size) // outputs: { width: 32, height: 32 }
const width = logo.getSize('width')
console.log(width) // outputs: 32
const height = logo.getSize('height')
console.log(height) // outputs: 32
})