http://qs1969.pair.com?node_id=11138018


in reply to Mocking request headers with Test::WWW::Mechanize?

If you're grabbing just HTML, I know you know HTTP::Tiny is nice lite'r option. I've never actually needed to use Mechanize - though always wanted to. I seem to have gone from just parsing HTML or JSON with LWP or HTTP::Tiny to using something like Playwright or Firefox::Marionette for interaction. Web::Scraper is super handy here. I know the "dream" is to have browserless browser objects, but frankly I don't know how this kind of thing can be sustainable - I think it's a miracle Mechanize still exists.

Replies are listed 'Best First'.
Re^2: Mocking request headers with Test::WWW::Mechanize?
by Anonymous Monk on Oct 25, 2021 at 15:31 UTC
    Well, in this case, everything is already set up with an elaborate structure and thousands of Mechanize-based tests, so the issue was solely how to do this one thing. I'll leave the restructuring of the entire app to the guy who comes after me :-)
      Indeed - like I said, I've always wanted to use Machanize, so now I'm just showing my envy. Dealing with "real" browsers is about as satisfying as one can suspect.