Retrieve the current window handle.

Parameters

Name Type description
callback function

Callback function which is called with the result value.

Usage

 this.demoTest = function (browser) {
   browser.windowHandle(function(result) {
     console.log(result.value);
   });
}

W3C WebDriver spec: