No results for

Powered byAlgolia

innerText([options])

Returns the element.innerText.

ParameterTypeDefaultDescription
options
objectnull

Returns

TypeDescription
stringThe innerText of the element.

Example

page.goto('https://test.k6.io/browser.php');
const offScreen = page.locator('#off-screen');
const innerText = offScreen.innerText();
console.log(innerText); // Off page div