in reply to Re^2: get html via WWW::Mechanize::Chrome
in thread get html via WWW::Mechanize::Chrome

Maybe now is a good time to learn about the "view-source" protocol (hotkey ctrl+u), which makes almost all browsers show you the HTML source of the current page. Also consider the Chrome Developer Tools which can be reached using ctrl+shift+i in Google Chrome.

What is wrong with using ->content?

If you have a bunch of html elements, maybe you can check ->get_attribute('ownerDocument'), but that's just a wild guess on my part.

Replies are listed 'Best First'.
Re^4: get html via WWW::Mechanize::Chrome
by morgon (Priest) on Nov 04, 2018 at 16:19 UTC
    I can't try at the moment, but while you're here I may just as well ask you...

    My understanding was (and that may very well be wrong) that ->content would give you the html-source as it is sent by the server.

    But what I am interested in is the html that results once some js-scripts have modified the dom.

    I thought that I would be able to retrieve that via innerHTML.

    I will try later, but maybe you could enlighten me if my whole understanding is way off...