ウィンドウサイズの取得
ブラウザウィンドウのサイズを返します。
使用方法
browser.getWindowSize()
例
getWindowSize.js
it('should return browser window size', async () => {
const windowSize = await browser.getWindowSize();
console.log(windowSize);
// outputs `{ width: 1280, height: 767 }`
});
戻り値
- <Object>
return
: W3Cの場合は{ x, y, width, height }
または非W3Cブラウザの場合は{ width, height }