getWindowSize
Renvoie la taille de la fenêtre du navigateur.
Usage
browser.getWindowSize()
Example
getWindowSize.js
it('should return browser window size', async () => {
const windowSize = await browser.getWindowSize();
console.log(windowSize);
// outputs `{ width: 1280, height: 767 }`
});
Returns
- <Object>
return:{ x, y, width, height }pour W3C ou{ width, height }pour les navigateurs non W3C