@testim/testim-cli
Version:
Command line interface for running Testing on you CI
24 lines (23 loc) • 509 B
JavaScript
/**
*
* Get source code of the page.
*
* <example>
:getSource.js
client
.url('http://webdriver.io')
.getSource().then(function(source) {
console.log(source); // outputs: "\n<title>Webdriver.io</title>..."
});
* </example>
*
* @returns {String} source code of current website
* @uses protocol/source
* @type property
*
*/
module.exports = function getSource () {
return this.unify(this.source(), {
extractValue: true
});
};