windowHandlePosition

Protocol bindings to receive or change the position of the browser window. If the windowHandle URL parameter is falsy, the currently active window will be considered.

Usage

1
client.windowHandlePosition([windowHandle][,position]).then(callback);

Parameters

Param Type Details
windowHandle
optional
String the window to receive/change the position
position
optional
Object the X and Y coordinates to position the window at, relative to the upper left corner of the screen

Example

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

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

// change the position of
// a specified window
client.windowHandlePosition('{dc30381e-e2f3-9444-8bf3-12cc44e8372a}', {x: 100, y: 200});

// the current window
client.windowHandlePosition({x: 100, y: 200});