Sets the current window state to fullscreen.

Parameters

Name Type description
callback
Optional
function

Optional callback function to be called when the command finishes.

Usage

module.exports = {
 'demo Test': function(browser) {
    browser.fullscreenWindow(function(result) {
      console.log(result);
    });
  },

  'ES6 async demo Test': async function(browser) {
    const result = await browser.fullscreenWindow();
    console.log('result value is:', result.value);
  }
}

W3C WebDriver spec: