getSource

Get source code of the page.

Usage

1
client.getSource().then(callback);

Parameters

Param Type Details

Example

getSource.js
1
2
3
4
5
client
.url('http://webdriver.io')
.getSource().then(function(source) {
console.log(source); // outputs: "<!DOCTYPE html>\n<title>Webdriver.io</title>..."
});

Uses