Returns the element.innerHTML.
page .goto('https://test.k6.io/browser.php') .then(() => { const offScreen = page.locator('#off-screen'); const innerHTML = offScreen.innerHTML(); console.log(innerHTML); });