title

Gets an object containing the current page title.

Usage

1
browser.title();

Example

title.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
it('should return title using protocol command', function () {
browser.url('http://webdriver.io');

var title = browser.title();
console.log(title);
// outputs the following:
// {
// state: 'success',
// sessionId: '0c49951c-eb15-4053-96af-c1ebc79fb8b7',
// hCode: 388233301,
// value: 'WebdriverIO - Selenium 2.0 javascript bindings for nodejs',
// class: 'org.openqa.selenium.remote.Response',
// status: 0
// }
});