Sitespeed: Selenium – get body text or html source

Want get HTML source ?

Use this: pageSource=await driver.getPageSource();

Want to get the visible text on the screen?

Use this:
pageSource=await driver.findElement(webdriver.By.tagName(“body”)).getText();

Leave a Reply

Your email address will not be published. Required fields are marked *