.exports() Suggest edits
Change or get the position of the specified window. If the second argument is a function it will be used as a callback and the call will perform a get request to retrieve the existing window position.
Usage
Example
this.demoTest = function (browser) {
// Change the position of the specified window.
// If the :windowHandle URL parameter is "current", the currently active window will be moved.
browser.windowPosition('current', 0, 0, function(result) {
console.log(result);
});
// Get the position of the specified window.
// If the :windowHandle URL parameter is "current", the position of the currently active window will be returned.
browser.windowPosition('current', function(result) {
console.log(result.value);
});
}
Parameters
Name | Type | description |
---|---|---|
windowHandle |
string | |
offsetX |
number | |
offsetY |
number | |
callback |
function | Callback function which is called with the result value. |