t.maximizeWindow Method

Maximizes the browser window. Can be chained with other TestController methods.

t.maximizeWindow() → this | Promise<any>

The following example shows how to use the t.maximizeWindow action.

import { Selector } from 'testcafe';

const menu = Selector('#side-menu');

fixture `My fixture`
    .page `http://www.example.com/`;

test('Side menu is displayed in full screen', async t => {
    await t

You can also resize the window to fit specified dimensions with t.resizeWindow method and to fit specified type of device with t.resizeWindowToFitDevice