@christian-bromann/webdriverio
Version:
A nodejs bindings implementation for selenium 2.0/webdriver
13 lines (10 loc) • 345 B
JavaScript
/**
* helper function to get the viewport size of the browser
*/
let getViewportSize = function () {
return {
screenWidth: Math.max(document.documentElement.clientWidth, window.innerWidth || 0),
screenHeight: Math.max(document.documentElement.clientHeight, window.innerHeight || 0)
}
}
export default getViewportSize