getUrl

Get the url of current opened website.

Usage

1
browser.getUrl();

Example

getUrl.js
1
2
3
4
5
6
7
8
it('should get the url of the current page', function () {
browser.url('http://webdriver.io');

var url = browser.getUrl();
console.log(url);
// outputs the following:
// "http://webdriver.io"
});

Uses