|We don't bite newbies here... much|
Test::WWW::Mechanize 1.40 adds scraping functionsby petdance (Parson)
|on Apr 13, 2012 at 21:03 UTC||Need Help??|
The new 1.40 release of Test::WWW::Mechanize adds functions to help scrape text from your HTML as you test it. This should make things much easier for your integration test of your web apps.
For example, if you want to make sure that this shows up:
then you can add an id attribute to the <h1>
and your test can check for it:
Two other functions are added to help in your text extraction: ->scrape_text_by_id() and ->scrape_text_by_attr().
Will these functions help your testing? Do you have other methods that you use to aid testing? As always, I welcome your feedback.