close

Close current window (and focus on an other window).

Usage

1
client.close([windowHandle]).then(callback);

Parameters

Param Type Details
windowHandle
optional
String new window to focus on

Example

close.js
1
2
3
4
5
6
7
8
9
10
client
.url('http://github.com')
.newWindow('http://google.com')
.getTitle().then(function(title) {
console.log(title); // outputs: "Google"
})
.close()
.getTitle().then(function(title) {
console.log(title); // outputs: "GitHub · Build software better, together."
});

Uses