How to use the testcafe-browser-tools.getViewportSize function in testcafe-browser-tools

To help you get started, we’ve selected a few testcafe-browser-tools examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github DevExpress / testcafe / src / test-run / browser-manipulation-queue.js View on Github external
async _resizeWindowToFitDevice (device, portrait, currentWidth, currentHeight) {
        const { landscapeWidth, portraitWidth } = getViewportSize(device);

        const width  = portrait ? portraitWidth : landscapeWidth;
        const height = portrait ? landscapeWidth : portraitWidth;

        return await this._resizeWindow(width, height, currentWidth, currentHeight);
    }