Set the current window state to fullscreen, similar to pressing F11 in most browsers.

Usage

                    .window.fullscreen([callback])
                

Example

module.exports = {
 'make current window fullscreen': function (browser) {
    browser.window.fullscreen(function () {
      console.log('window in fullscreen mode');
    });
  },

  'make current window fullscreen with ES6 async/await': async function (browser) {
    await browser.window.fullscreen();
  }
}

Parameters

Name Type description
callback
Optional
function

Optional callback function to be called when the command finishes.

See also

W3C WebDriver spec