webdriverio-workflo
Version:
This is a customized version of webdriverio for use with workflo framework.
35 lines (31 loc) • 903 B
JavaScript
Object.defineProperty(exports, "__esModule", {
value: true
});
/**
*
* Get source code of the page. This command won't work in mobile environments for native apps. If you are running
* hybrid tests make sure that you are in the webview before calling this command.
*
* <example>
:getSource.js
it('should get the source of the html document', function () {
browser.url('http://webdriver.io');
var source = browser.getSource();
console.log(source); // outputs: "<!DOCTYPE html>\n<title>Webdriver.io</title>..."
});
* </example>
*
* @alias browser.getSource
* @return {String} source code of current website
* @uses protocol/source
* @type property
*
*/
var getSource = function getSource() {
return this.unify(this.source(), {
extractValue: true
});
};
exports.default = getSource;
module.exports = exports["default"];
;