I donโt know the answer, not related to the switch on the page, and for XmlPage and SgmlPage you need to make innerHTML in the HTML element and manually write out the attributes. Not elegant and accurate (its doctype is missing), but it works.
Page.getWebResponse (). GetContentAsString ()
This is not true since it returns the text form of the original unrendered, no js bytes. If javascript executes and modifies the material, then this method will not see the changes.
page.asXml () will return HTML. page.asText () returns it in plain text.
I just want to confirm that this only returns text in text nodes and does not include tags and their attributes. If you want to take full HTML, this is not very good.
source share