windowHandleSize

Protocol binding to get or change the size of the browser.

Usage

1
client.windowHandleSize([windowHandle][,dimension]).then(callback);

Parameters

Param Type Details
windowHandle
optional
String the window to receive/change the size
dimension
optional
Object the new size of the window

Example

windowHandleSize.js
1
2
3
4
5
6
7
8
9
10
11
12
13
// get the size of
// a specified window
client.windowHandleSize('dc30381e-e2f3-9444-8bf3-12cc44e8372a', function(err,res) { .. });

// the current window
client.windowHandleSize(function(err,res) { ... });

// change the position of
// a specified window
client.windowHandleSize('dc30381e-e2f3-9444-8bf3-12cc44e8372a', {width: 800, height: 600});

// the current window
client.windowHandleSize({width: 800, height: 600});