الحصول على حجم النافذة
يُرجع حجم نافذة المتصفح.
الاستخدام
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
:{ x, y, width, height }
لـ W3C أو{ width, height }
للمتصفح ات غير W3C