Chrome View Page Source: How can I see HTML content generated by JavaScript?

An an example, here is a link for the abstract of a paper. If you look at the page source, you will not see most of the content. It appears that there is JavaScript so the browser retrieves some content after the page is served. I am not knowledgeable enough about JavaScript to know how this works, but is there a way to get the final as-displayed HTML?

The end goal is that I would like to retrieve this page with a GET using VBA and parse the page for various elements, but those elements are part of the JavaScript retrieval so my code doesn’t see them.

Use the Chrome Inspector (ctrl-shift-j) instead of view source to see the final HTML.

And if you go to the Network tab and reload the page, you can see all the HTTP requests that are happening. In this case, the body of the abstract comes from an XHR request to Espacenet - Bibliographic data

Also, this might be easier to do in Google Sheets than VBA. A single formula can get you the abstract:



=importxml("https://worldwide.espacenet.com/data/publicationDetails/biblio?DB=EPODOC&II=0&ND=3&adjacent=true&locale=en_EP&FT=D&date=20190709&CC=KR&NR=20190082024A&KC=A&rnd=1592067094437","/html/body/div[1]/div[6]/div/div[2]/div[2]/p[1]")