@luminati-io/webdriverio8
Version:
Next-gen browser and mobile automation test framework for Node.js
32 lines (31 loc) • 989 B
TypeScript
/**
*
* Get source code of specified DOM element by selector.
*
* <example>
:index.html
<div id="test">
<span>Lorem ipsum dolor amet</span>
</div>
:getHTML.js
it('should get html for certain elements', async () => {
var outerHTML = await $('#test').getHTML();
console.log(outerHTML);
// outputs:
// "<div id="test"><span>Lorem ipsum dolor amet</span></div>"
var innerHTML = await $('#test').getHTML(false);
console.log(innerHTML);
// outputs:
// "<span>Lorem ipsum dolor amet</span>"
});
* </example>
*
* @alias element.getHTML
* @param {Boolean=} includeSelectorTag if true it includes the selector element tag (default: true)
* @return {String} the HTML of the specified element
* @uses action/selectorExecute
* @type property
*
*/
export declare function getHTML(this: WebdriverIO.Element, includeSelectorTag?: boolean): Promise<string>;
//# sourceMappingURL=getHTML.d.ts.map